﻿using Microsoft.EntityFrameworkCore;
using Traffic.Entity;
using TrafficWebApi.Respoitories.Interfaces;

namespace TrafficWebApi.Data
{
    public partial class AppDbContext : DbContext
    {

        public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }

        #region DbSet
        public virtual DbSet<AgeType> AgeTypes { get; set; }

        public virtual DbSet<ApplyOperate> ApplyOperates { get; set; }

        public virtual DbSet<AppointComputedParam> AppointComputedParams { get; set; }

        public virtual DbSet<AppointLimitDate> AppointLimitDates { get; set; }

        public virtual DbSet<AppointOrderList> AppointOrderLists { get; set; }

        public virtual DbSet<AppointOrderListCostInfo> AppointOrderListCostInfos { get; set; }

        public virtual DbSet<AppointOrderListInfo> AppointOrderListInfos { get; set; }

        public virtual DbSet<AppointOrderListServiceLog> AppointOrderListServiceLogs { get; set; }

        public virtual DbSet<AppointOrderListStatusRecord> AppointOrderListStatusRecords { get; set; }

        public virtual DbSet<AppointOrderListVisit> AppointOrderListVisits { get; set; }

        public virtual DbSet<AppointOrderListZh> AppointOrderListZhs { get; set; }

        public virtual DbSet<ApporderDispatch> ApporderDispatches { get; set; }

        public virtual DbSet<ApporderDispatchInfo> ApporderDispatchInfos { get; set; }

        public virtual DbSet<BalanceUnit> BalanceUnits { get; set; }

        public virtual DbSet<BlackList> BlackLists { get; set; }

        public virtual DbSet<BookingMessage> BookingMessages { get; set; }

        public virtual DbSet<BusLineModel> BusLineModels { get; set; }

        public virtual DbSet<BusLineModelBalance> BusLineModelBalances { get; set; }

        public virtual DbSet<BusLineModelPlace> BusLineModelPlaces { get; set; }

        public virtual DbSet<BusLineModelPlacePrice> BusLineModelPlacePrices { get; set; }

        public virtual DbSet<BusLineType> BusLineTypes { get; set; }

        public virtual DbSet<BusList> BusLists { get; set; }

        public virtual DbSet<Business> Businesses { get; set; }

        public virtual DbSet<BusinessAddressList> BusinessAddressLists { get; set; }

        public virtual DbSet<BusinessAirLine> BusinessAirLines { get; set; }

        public virtual DbSet<BusinessDepart> BusinessDeparts { get; set; }

        public virtual DbSet<BusinessDutyList> BusinessDutyLists { get; set; }

        public virtual DbSet<BusinessJobGrade> BusinessJobGrades { get; set; }

        public virtual DbSet<BusinessJobGradeInclude> BusinessJobGradeIncludes { get; set; }

        public virtual DbSet<BusinessJobGradeKpi> BusinessJobGradeKpis { get; set; }

        public virtual DbSet<BusinessKpilist> BusinessKpilists { get; set; }

        public virtual DbSet<BusinessPickupPrice> BusinessPickupPrices { get; set; }

        public virtual DbSet<BusinessStaff> BusinessStaffs { get; set; }

        public virtual DbSet<BusinessStaffKpiscore> BusinessStaffKpiscores { get; set; }

        public virtual DbSet<CardList> CardLists { get; set; }

        public virtual DbSet<Company> Companies { get; set; }

        public virtual DbSet<Department> Departments { get; set; }

        public virtual DbSet<DistributionUserAuthority> DistributionUserAuthorities { get; set; }

        public virtual DbSet<DistributionUserInfo> DistributionUserInfos { get; set; }

        public virtual DbSet<DloungeSalesTicketSystemLoginfo> DloungeSalesTicketSystemLoginfos { get; set; }

        public virtual DbSet<Driver> Drivers { get; set; }

        public virtual DbSet<Emp> Emps { get; set; }

        public virtual DbSet<EmpRole> EmpRoles { get; set; }

        public virtual DbSet<EmpSysMenuList> EmpSysMenuLists { get; set; }

        public virtual DbSet<EventOrder> EventOrders { get; set; }

        public virtual DbSet<ExtraService> ExtraServices { get; set; }

        public virtual DbSet<FlightConfig> FlightConfigs { get; set; }

        public virtual DbSet<FlightOrderList> FlightOrderLists { get; set; }

        public virtual DbSet<FlightOrderListChangeOrder> FlightOrderListChangeOrders { get; set; }

        public virtual DbSet<FlightOrderListPassenger> FlightOrderListPassengers { get; set; }

        public virtual DbSet<FlightOrderListPsgSegment> FlightOrderListPsgSegments { get; set; }

        public virtual DbSet<FlightOrderListRefundOrder> FlightOrderListRefundOrders { get; set; }

        public virtual DbSet<FlightPsgInfo> FlightPsgInfos { get; set; }

        public virtual DbSet<Frequency> Frequencies { get; set; }

        public virtual DbSet<FrequencyNanYuePlace> FrequencyNanYuePlaces { get; set; }

        public virtual DbSet<FrequencyPlaceArrive> FrequencyPlaceArrives { get; set; }

        public virtual DbSet<HandOverList> HandOverLists { get; set; }

        public virtual DbSet<HaveIntentionUserList> HaveIntentionUserLists { get; set; }

        public virtual DbSet<InterceptAirCompany> InterceptAirCompanies { get; set; }

        public virtual DbSet<InvoiceLog> InvoiceLogs { get; set; }

        public virtual DbSet<InvoiceRecord> InvoiceRecords { get; set; }

        public virtual DbSet<LinePlace> LinePlaces { get; set; }

        public virtual DbSet<MacLog> MacLogs { get; set; }

        public virtual DbSet<Machine> Machines { get; set; }

        public virtual DbSet<MemberFunction> MemberFunctions { get; set; }

        public virtual DbSet<MemberLevel> MemberLevels { get; set; }

        public virtual DbSet<MemberLevelBindFunction> MemberLevelBindFunctions { get; set; }

        public virtual DbSet<MenuFunction> MenuFunctions { get; set; }

        public virtual DbSet<MobileRecord> MobileRecords { get; set; }

        public virtual DbSet<ObeArlineCompany> ObeArlineCompanies { get; set; }

        public virtual DbSet<ObeAviation> ObeAviations { get; set; }

        public virtual DbSet<ObeCity> ObeCities { get; set; }

        public virtual DbSet<OrderList> OrderLists { get; set; }

        public virtual DbSet<OrderListCheckDatum> OrderListCheckData { get; set; }

        public virtual DbSet<OrderListInfo> OrderListInfos { get; set; }

        public virtual DbSet<OrderListInfoFrequency> OrderListInfoFrequencies { get; set; }

        public virtual DbSet<OrderListPlan> OrderListPlans { get; set; }

        public virtual DbSet<OrderListRebateInfo> OrderListRebateInfos { get; set; }

        public virtual DbSet<OrderListServiceList> OrderListServiceLists { get; set; }

        public virtual DbSet<OrderListThirdChannel> OrderListThirdChannels { get; set; }

        public virtual DbSet<PayRequest> PayRequests { get; set; }

        public virtual DbSet<PayRequestsDetail> PayRequestsDetails { get; set; }

        public virtual DbSet<PaymentList> PaymentLists { get; set; }

        public virtual DbSet<PickupAreaPrice> PickupAreaPrices { get; set; }

        public virtual DbSet<PickupOrderGroup> PickupOrderGroups { get; set; }

        public virtual DbSet<PickupOrderGroupsOrderDetail> PickupOrderGroupsOrderDetails { get; set; }

        public virtual DbSet<PickupPriceAdjust> PickupPriceAdjusts { get; set; }

        public virtual DbSet<PictureList> PictureLists { get; set; }

        public virtual DbSet<PictureType> PictureTypes { get; set; }

        public virtual DbSet<PutCardInfo> PutCardInfos { get; set; }

        public virtual DbSet<RebateConfig> RebateConfigs { get; set; }

        public virtual DbSet<ReceiptAssign> ReceiptAssigns { get; set; }

        public virtual DbSet<Role> Roles { get; set; }

        public virtual DbSet<SCity> SCities { get; set; }

        public virtual DbSet<SDistrict> SDistricts { get; set; }

        public virtual DbSet<SProvince> SProvinces { get; set; }

        public virtual DbSet<SalesBindGuest> SalesBindGuests { get; set; }

        public virtual DbSet<SalesmanList> SalesmanLists { get; set; }

        public virtual DbSet<ScopeClassifyGood> ScopeClassifyGoods { get; set; }

        public virtual DbSet<ScopeExtraService> ScopeExtraServices { get; set; }

        public virtual DbSet<ScopeGoodsModel> ScopeGoodsModels { get; set; }

        public virtual DbSet<ScopeOrderList> ScopeOrderLists { get; set; }

        public virtual DbSet<ScopeOrderListGoodsList> ScopeOrderListGoodsLists { get; set; }

        public virtual DbSet<ScopeOrderListInfo> ScopeOrderListInfos { get; set; }

        public virtual DbSet<ScopeOrderListServiceList> ScopeOrderListServiceLists { get; set; }

        public virtual DbSet<ScopeType> ScopeTypes { get; set; }

        public virtual DbSet<ScopeTypeClassify> ScopeTypeClassifies { get; set; }

        public virtual DbSet<SearchFlightRecord> SearchFlightRecords { get; set; }

        public virtual DbSet<ShareEvent> ShareEvents { get; set; }

        public virtual DbSet<ShareEventRecord> ShareEventRecords { get; set; }

        public virtual DbSet<ShareEventRecordActivityRecord> ShareEventRecordActivityRecords { get; set; }

        public virtual DbSet<ShareEventRecordClickList> ShareEventRecordClickLists { get; set; }

        public virtual DbSet<StorageCompany> StorageCompanies { get; set; }

        public virtual DbSet<StorageCompanyDetail> StorageCompanyDetails { get; set; }

        public virtual DbSet<SubsidyRule> SubsidyRules { get; set; }

        public virtual DbSet<SysAccount> SysAccounts { get; set; }

        public virtual DbSet<SysAccountRole> SysAccountRoles { get; set; }

        public virtual DbSet<SysAccountToken> SysAccountTokens { get; set; }

        public virtual DbSet<SysMenu> SysMenus { get; set; }

        public virtual DbSet<SysMenuList> SysMenuLists { get; set; }

        public virtual DbSet<TicketOrderView> TicketOrderViews { get; set; }

        public virtual DbSet<TmpContact> TmpContacts { get; set; }

        public virtual DbSet<UserBonu> UserBonus { get; set; }

        public virtual DbSet<UserBonusRecord> UserBonusRecords { get; set; }

        public virtual DbSet<UserDataAddress> UserDataAddresses { get; set; }

        public virtual DbSet<UserDataApproval> UserDataApprovals { get; set; }

        public virtual DbSet<UserDataContact> UserDataContacts { get; set; }

        public virtual DbSet<UserDataVipContract> UserDataVipContracts { get; set; }

        public virtual DbSet<UserDatePhoneInfo> UserDatePhoneInfos { get; set; }

        public virtual DbSet<UserDatum> UserData { get; set; }

        public virtual DbSet<UserInclude> UserIncludes { get; set; }

        public virtual DbSet<UserOrder> UserOrders { get; set; }

        public virtual DbSet<UserVipInfo> UserVipInfos { get; set; }

        public virtual DbSet<UserWallet> UserWallets { get; set; }

        public virtual DbSet<UserWalletRecord> UserWalletRecords { get; set; }

        public virtual DbSet<UserWxInteraction> UserWxInteractions { get; set; }

        public virtual DbSet<VBusinessAppointOrder> VBusinessAppointOrders { get; set; }

        public virtual DbSet<VFrequencyModelSettlementByDay> VFrequencyModelSettlementByDays { get; set; }

        public virtual DbSet<VFrequencyPassengerList> VFrequencyPassengerLists { get; set; }

        public virtual DbSet<VFrequencySettlement> VFrequencySettlements { get; set; }

        public virtual DbSet<VGoOutPersonInfo> VGoOutPersonInfos { get; set; }

        public virtual DbSet<VOrderSetTimeSettlement> VOrderSetTimeSettlements { get; set; }

        public virtual DbSet<VOrderlistFenxiao> VOrderlistFenxiaos { get; set; }

        public virtual DbSet<VSellSettlementByFrequency> VSellSettlementByFrequencies { get; set; }

        public virtual DbSet<VipCouponOrder> VipCouponOrders { get; set; }

        public virtual DbSet<VipLevel> VipLevels { get; set; }

        public virtual DbSet<VipProPrice> VipProPrices { get; set; }

        public virtual DbSet<WeChatParam> WeChatParams { get; set; }

        public virtual DbSet<Zhresponse> Zhresponses { get; set; }
        #endregion

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<AgeType>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToTable("AgeType");

                entity.Property(e => e.BusLineId)
                    .HasDefaultValue(0)
                    .HasComment("线路模板id");
                entity.Property(e => e.Id).ValueGeneratedOnAdd();
                entity.Property(e => e.PlacePriceId).HasComment("线路价格ID");
                entity.Property(e => e.Price).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<ApplyOperate>(entity =>
            {
                entity.ToTable("ApplyOperate", tb => tb.HasComment("系统操作申请"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ApplyRemarks)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("申请人备注");
                entity.Property(e => e.ApplyState).HasComment("申请状态  0：未审批    1：已完成审批   2：驳回申请");
                entity.Property(e => e.ApplyUserId)
                    .HasComment("申请人，对应SysAccount.ID")
                    .HasColumnName("ApplyUserID");
                entity.Property(e => e.ApplyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("申请人姓名");
                entity.Property(e => e.ChangeOrder)
                    .HasDefaultValue(true)
                    .HasComment("是否需要修改订单 ");
                entity.Property(e => e.CheckTime)
                    .HasComment("审批时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.CheckUserId)
                    .HasComment("审批人SysAccount.ID")
                    .HasColumnName("CheckUserID");
                entity.Property(e => e.CheckUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("审批人姓名");
                entity.Property(e => e.CheckerRemarks)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("审批人备注");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("记录创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.OperaContent)
                    .HasComment("操作内容")
                    .HasColumnType("text");
                entity.Property(e => e.OperateType).HasComment("操作类型  0：退款 1：转班次");
                entity.Property(e => e.OrderId)
                    .HasComment("对应订单ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.OrderType).HasComment("订单类型  0：购票订单  1：业务订单");
                entity.Property(e => e.RoleName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("审批该请求要用到的权限名称");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：作废   1：正常（默认）");
            });

            modelBuilder.Entity<AppointComputedParam>(entity =>
            {
                entity.ToTable(tb => tb.HasComment("排车计算参数"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId).HasColumnName("BusinessID");
                entity.Property(e => e.ChargeTime)
                    .HasDefaultValue(60)
                    .HasComment("充电时长（分钟）");
                entity.Property(e => e.IsOverTime)
                    .HasDefaultValue(true)
                    .HasComment("是否允许排车超出值班时间");
                entity.Property(e => e.RestTime).HasComment("休息间隔  （分钟）");
                entity.Property(e => e.TroubleTime).HasComment("预留时间 （分钟）");
            });

            modelBuilder.Entity<AppointLimitDate>(entity =>
            {
                entity.ToTable("AppointLimitDate", tb => tb.HasComment("预约限制日期"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.IsGo)
                    .HasDefaultValue(true)
                    .HasComment("是否去程");
                entity.Property(e => e.LimitEndDate)
                    .HasComment("结束时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.LimitStartDate)
                    .HasComment("开始时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.LimitType).HasComment("限制类型 0：接送  1：包车");
                entity.Property(e => e.Operator)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("操作人");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  1：正常（默认）  0：作废");
            });

            modelBuilder.Entity<AppointOrderList>(entity =>
            {
                entity.ToTable("AppointOrderList", tb => tb.HasComment("约车出行订单表"));

                entity.HasIndex(e => new { e.OrderNum, e.UserId, e.BookingDate, e.OrderType }, "IX_AppointOrderList").IsUnique();

                entity.HasIndex(e => new { e.FromBusinessId, e.BusinessUid, e.DriverName, e.CarNo, e.FromOrderNum, e.Status, e.OrderState }, "SearchKey");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BookingDate)
                    .HasComment("预定日期时间，传到api时要转成10位时间戳(秒数)")
                    .HasColumnType("datetime")
                    .HasColumnName("bookingDate");
                entity.Property(e => e.BookingEndAddr)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("下车地点(URLEncode编码后的值)")
                    .HasColumnName("bookingEndAddr");
                entity.Property(e => e.BookingEndPointLa)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("下车地点纬度坐标")
                    .HasColumnName("bookingEndPointLa");
                entity.Property(e => e.BookingEndPointLo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("下车地点经度坐标")
                    .HasColumnName("bookingEndPointLo");
                entity.Property(e => e.BookingStartAddr)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("上车地点(URLEncode编码后的值)")
                    .HasColumnName("bookingStartAddr");
                entity.Property(e => e.BookingStartPointLa)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("上车地点纬度坐标")
                    .HasColumnName("bookingStartPointLa");
                entity.Property(e => e.BookingStartPointLo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("上车地点经度坐标")
                    .HasColumnName("bookingStartPointLo");
                entity.Property(e => e.BusinessUid)
                    .HasMaxLength(64)
                    .IsUnicode(false)
                    .HasComment("合作商户用户UID")
                    .HasColumnName("Business_UID");
                entity.Property(e => e.CarNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("车牌号码")
                    .HasColumnName("CarNO");
                entity.Property(e => e.CityId)
                    .HasComment("城市id(测试环境请用44)")
                    .HasColumnName("cityId");
                entity.Property(e => e.Contact)
                    .HasMaxLength(90)
                    .IsUnicode(false)
                    .HasComment("客户姓名，对应api riderName");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("订单创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.DeviceAddress)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("设置下单时获取的地址");
                entity.Property(e => e.DeviceLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("设备下单时获取的经纬度");
                entity.Property(e => e.Distance)
                    .HasComment("预估公里数")
                    .HasColumnName("distance");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机姓名");
                entity.Property(e => e.Duration)
                    .HasComment("预估行车时长")
                    .HasColumnName("duration");
                entity.Property(e => e.EndCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("目的地城市");
                entity.Property(e => e.EndDistrict)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("目的地城镇");
                entity.Property(e => e.EstimatedAmount)
                    .HasComment("预估金额，传预估返回车型原价disMoney，多车型时以最低价格为准【下单前必须调用预估接口】")
                    .HasColumnType("decimal(9, 2)")
                    .HasColumnName("estimatedAmount");
                entity.Property(e => e.FromBusinessId)
                    .HasDefaultValue(2)
                    .HasComment("对应Business.ID")
                    .HasColumnName("FromBusinessID");
                entity.Property(e => e.FromOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("外派单对应车票或业务单订单号  OrderType=1||2时必填");
                entity.Property(e => e.FromParams)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("客户来源");
                entity.Property(e => e.GroupIds)
                    .HasComment("下单车型，如“34”:舒适型/公务级 \"35\":商务7座  \"40\":商务福祉车  \"41\":豪华型/行政级  \"43\":畅享型")
                    .HasColumnName("groupIds");
                entity.Property(e => e.IsGo)
                    .HasDefaultValue(true)
                    .HasComment("是否去程 1：是（去程默认）  0：否（回程）");
                entity.Property(e => e.IsPriOrder).HasComment("是否私有订单（不上传红旗系统）  0:不是私有单，上传（默认）  1：是私有单，不上传。");
                entity.Property(e => e.LuggageCount).HasComment("行李件数  默认0");
                entity.Property(e => e.MainOrderId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("调用官方开放接口后生成的对应官方平台的订单流水，用作查询订单信息。");
                entity.Property(e => e.MainOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("调用官方开放接口后生成的对应官方平台的订单号，用作查询订单信息。");
                entity.Property(e => e.MemberCount)
                    .HasDefaultValue(1)
                    .HasComment("乘车人数 默认1");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("订单号A+yyyyMMddHHmm+todayCount");
                entity.Property(e => e.OrderState).HasComment("订单状态  0：生成订单，待支付   1：已支付完成   2：已完成订单   3：订单申请退款    4：订单已退款");
                entity.Property(e => e.OrderType).HasComment("订单类型  0：普通预约单  1：车票接送单  2：业务接送单  3：商户来源");
                entity.Property(e => e.PayFlag)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("是否渠道付款，0为渠道付")
                    .HasColumnName("payFlag");
                entity.Property(e => e.RealBookingDate)
                    .HasComment("实际接送时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.RiderPhone)
                    .HasMaxLength(90)
                    .IsUnicode(false)
                    .HasComment("乘车人手机号")
                    .HasColumnName("riderPhone");
                entity.Property(e => e.ServiceType)
                    .HasComment("订单类型,1:随叫随到;2:预约用车;3:接机;5:送机;6:日租;7:半日租")
                    .HasColumnName("serviceType");
                entity.Property(e => e.StartCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("出发城市");
                entity.Property(e => e.StartDistrict)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("出发区域");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("订单状态  默认1：正常  0：作废");
                entity.Property(e => e.SysLog)
                    .HasComment("系统记录")
                    .HasColumnType("text");
                entity.Property(e => e.TotalPrice)
                    .HasComment("总价")
                    .HasColumnType("decimal(9, 2)");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID，对应UserData.ID")
                    .HasColumnName("UserID");
                entity.Property(e => e.UserRemarks)
                    .HasComment("用户备注")
                    .HasColumnType("text");
            });

            modelBuilder.Entity<AppointOrderListCostInfo>(entity =>
            {
                entity.ToTable("AppointOrderList_CostInfo", tb => tb.HasComment("出行约车订单消费明细"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ActualPayAmount)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValueSql("((0))")
                    .HasComment("乘客支付金额（优惠前）")
                    .HasColumnName("actualPayAmount");
                entity.Property(e => e.BasePrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("基础价(套餐资费)")
                    .HasColumnName("basePrice");
                entity.Property(e => e.CouponSettleAmout)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("优惠券抵扣金额")
                    .HasColumnName("couponSettleAmout");
                entity.Property(e => e.CustomerPayPrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValueSql("((0))")
                    .HasComment("乘客支付金额(actualPayAmount-couponSettleAmout)")
                    .HasColumnName("customerPayPrice");
                entity.Property(e => e.DecimalsFees)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("抹零费")
                    .HasColumnName("decimalsFees");
                entity.Property(e => e.DesignatedDriverFee)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("指定司机费，如无该项功能可忽略")
                    .HasColumnName("designatedDriverFee");
                entity.Property(e => e.DriverPay)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机代收")
                    .HasColumnName("driverPay");
                entity.Property(e => e.DynamicPrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("折扣价格")
                    .HasColumnName("dynamic_price");
                entity.Property(e => e.HotDuration)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("高峰时长")
                    .HasColumnName("hotDuration");
                entity.Property(e => e.HotDurationFees)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("高峰时长费")
                    .HasColumnName("hotDurationFees");
                entity.Property(e => e.HotMileage)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("高峰里程")
                    .HasColumnName("hotMileage");
                entity.Property(e => e.HotMileageFees)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("高峰里程费")
                    .HasColumnName("hotMileageFees");
                entity.Property(e => e.IncludeMileage)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("基础价包含公里")
                    .HasColumnName("includeMileage");
                entity.Property(e => e.IncludeMinute)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("基础价包含时长(单位：分钟)")
                    .HasColumnName("includeMinute");
                entity.Property(e => e.LongDistanceNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("长途里程")
                    .HasColumnName("longDistanceNum");
                entity.Property(e => e.LongDistancePrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("长途费")
                    .HasColumnName("longDistancePrice");
                entity.Property(e => e.LongPrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("长途单价(里程)")
                    .HasColumnName("longPrice");
                entity.Property(e => e.Mileage)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("订单总里程")
                    .HasColumnName("mileage");
                entity.Property(e => e.MileagePrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("里程定价")
                    .HasColumnName("mileagePrice");
                entity.Property(e => e.Min)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("订单总时长")
                    .HasColumnName("min");
                entity.Property(e => e.NighitDuration)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("夜间服务时长")
                    .HasColumnName("nighitDuration");
                entity.Property(e => e.NighitDurationFees)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("夜间服务时长费")
                    .HasColumnName("nighitDurationFees");
                entity.Property(e => e.NightDistanceNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("夜间服务里程")
                    .HasColumnName("nightDistanceNum");
                entity.Property(e => e.NightDistancePrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("夜间服务里程费")
                    .HasColumnName("nightDistancePrice");
                entity.Property(e => e.NightPrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("夜间服务费（里程）单价")
                    .HasColumnName("nightPrice");
                entity.Property(e => e.NightPriceTime)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("夜间服务费（时长）单价")
                    .HasColumnName("nightPriceTime");
                entity.Property(e => e.OrderId).HasColumnName("OrderID");
                entity.Property(e => e.OtherCost)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("其他费用(包含停车费、高速费、机场服务费、食宿费、语音服务费)")
                    .HasColumnName("otherCost");
                entity.Property(e => e.OverMilageNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("超里程数")
                    .HasColumnName("overMilageNum");
                entity.Property(e => e.OverMilageNumTotal)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("里程费小计：平峰里程+高峰里程")
                    .HasColumnName("overMilageNumTotal");
                entity.Property(e => e.OverMilagePrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("超里程费")
                    .HasColumnName("overMilagePrice");
                entity.Property(e => e.OverTimeNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("超时长数")
                    .HasColumnName("overTimeNum");
                entity.Property(e => e.OverTimeNumTotal)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("时长费小计：平峰时长+高峰时长")
                    .HasColumnName("overTimeNumTotal");
                entity.Property(e => e.OverTimePrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("超时长费")
                    .HasColumnName("overTimePrice");
                entity.Property(e => e.PeakPrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("高峰单价(里程)")
                    .HasColumnName("peakPrice");
                entity.Property(e => e.PeakPriceTime)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("高峰单价(时长)")
                    .HasColumnName("peakPriceTime");
                entity.Property(e => e.ReducePrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("减免金额")
                    .HasColumnName("reducePrice");
                entity.Property(e => e.ReducePriceDesc)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("减免描述")
                    .HasColumnName("reducePriceDesc");
                entity.Property(e => e.TimePrice)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("分钟定价")
                    .HasColumnName("timePrice");
                entity.Property(e => e.Total)
                    .HasColumnType("decimal(9, 2)")
                    .HasColumnName("total");
                entity.Property(e => e.WaitingFee)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("等待费用")
                    .HasColumnName("waitingFee");
                entity.Property(e => e.WaitingMinutes)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("等待时长")
                    .HasColumnName("waitingMinutes");
            });

            modelBuilder.Entity<AppointOrderListInfo>(entity =>
            {
                entity.ToTable("AppointOrderList_Info", tb => tb.HasComment("订单明细信息"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BookingEndAddr)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("预定下车地址")
                    .HasColumnName("bookingEndAddr");
                entity.Property(e => e.BookingStartAddr)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("预定上车地址")
                    .HasColumnName("bookingStartAddr");
                entity.Property(e => e.DriverId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机ID")
                    .HasColumnName("driverId");
                entity.Property(e => e.DriverRate)
                    .HasComment("司机评分")
                    .HasColumnName("driverRate");
                entity.Property(e => e.GroupName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("舒适型")
                    .HasColumnName("groupName");
                entity.Property(e => e.LicensePlates)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("车牌 冀FA0296")
                    .HasColumnName("licensePlates");
                entity.Property(e => e.MainOrderState).HasComment("官方接口订单状态 10：预定中  15：待服务  20：已出发  25：已到达  30：服务中  40：待结算  43：扣款中  45：已结算  50：已完成  60：已取消");
                entity.Property(e => e.ModelName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("车型 奥迪A6")
                    .HasColumnName("modelName");
                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机姓名")
                    .HasColumnName("name");
                entity.Property(e => e.OrderId)
                    .HasComment("订单ID，对应AppointOrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.Phone)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机电话")
                    .HasColumnName("phone");
            });

            modelBuilder.Entity<AppointOrderListServiceLog>(entity =>
            {
                entity.ToTable("AppointOrderList_ServiceLog", tb => tb.HasComment("预约车订单服务记录"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AlreadyRead).HasComment("已读");
                entity.Property(e => e.AppointOrderId).HasColumnName("AppointOrderID");
                entity.Property(e => e.CarNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("车牌号码")
                    .HasColumnName("CarNO");
                entity.Property(e => e.Checker)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("信息已读者的OPENID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.DeviceAddress)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("设置下单时获取的地址");
                entity.Property(e => e.DeviceLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("设备下单时获取的经纬度");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机姓名");
                entity.Property(e => e.FromAppointOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.FromOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("外派单对应车票或业务单订单号  OrderType=1||2时必填");
                entity.Property(e => e.LogType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("记录类型 DriverArrive,DriverLate,GuestArrive,GuestLate,OrderFinish");
                entity.Property(e => e.ReadTime)
                    .HasComment("已读时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Remarks).HasColumnType("text");
            });

            modelBuilder.Entity<AppointOrderListStatusRecord>(entity =>
            {
                entity.ToTable("AppointOrderList_StatusRecord", tb => tb.HasComment("预约订车回调状态记录表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Accepted)
                    .HasComment("司机接单	推送司机应单信息：meta中必须包含driverInfo节点中的数据")
                    .HasColumnType("text")
                    .HasColumnName("accepted");
                entity.Property(e => e.AcceptedTime)
                    .HasColumnType("datetime")
                    .HasColumnName("acceptedTime");
                entity.Property(e => e.Arriving)
                    .HasComment("已到达	推送司机到达信息")
                    .HasColumnType("text")
                    .HasColumnName("arriving");
                entity.Property(e => e.ArrivingTime)
                    .HasColumnType("datetime")
                    .HasColumnName("arrivingTime");
                entity.Property(e => e.Completed)
                    .HasComment("服务结束已结算	推送服务完成信息:meta中必须包含feeInfo节点中的数据")
                    .HasColumnType("text")
                    .HasColumnName("completed");
                entity.Property(e => e.CompletedTime)
                    .HasColumnType("datetime")
                    .HasColumnName("completedTime");
                entity.Property(e => e.CsCanceled)
                    .HasComment("客服取消	推送客服取消信息:meta中必须包含customerServiceInfo节点中的数据")
                    .HasColumnType("text")
                    .HasColumnName("cs_canceled");
                entity.Property(e => e.CsCanceledTime)
                    .HasColumnType("datetime")
                    .HasColumnName("cs_canceledTime");
                entity.Property(e => e.CsRefund)
                    .HasComment("退款回调	退款时回调")
                    .HasColumnType("text")
                    .HasColumnName("cs_refund");
                entity.Property(e => e.CsRefundTime)
                    .HasColumnType("datetime")
                    .HasColumnName("cs_refundTime");
                entity.Property(e => e.DriverOvertimeCanceled)
                    .HasComment("挂时长取消	司机未到达50分钟以上，系统取消并回调")
                    .HasColumnType("text")
                    .HasColumnName("driver_overtime_canceled");
                entity.Property(e => e.DriverOvertimeCanceledTime)
                    .HasColumnType("datetime")
                    .HasColumnName("driver_overtime_canceledTime");
                entity.Property(e => e.EndTrip)
                    .HasComment("服务完成待结算	推送司机结束行程(开始结算)信息")
                    .HasColumnType("text")
                    .HasColumnName("end_trip");
                entity.Property(e => e.EndTripTime)
                    .HasColumnType("datetime")
                    .HasColumnName("end_tripTime");
                entity.Property(e => e.InProgress)
                    .HasComment("服务中	推送司机开始服务信息")
                    .HasColumnType("text")
                    .HasColumnName("in_progress");
                entity.Property(e => e.InProgressTime)
                    .HasColumnType("datetime")
                    .HasColumnName("in_progressTime");
                entity.Property(e => e.OfflinePay)
                    .HasComment("司机代收	推送司机代收信息: meta中必须包含chargeInfo节点中的数据")
                    .HasColumnType("text")
                    .HasColumnName("offline_pay");
                entity.Property(e => e.OfflinePayTime)
                    .HasColumnType("datetime")
                    .HasColumnName("offline_payTime");
                entity.Property(e => e.OrderFinished)
                    .HasComment("订单确认	确认后推送已完成详情")
                    .HasColumnType("text")
                    .HasColumnName("order_finished");
                entity.Property(e => e.OrderFinishedTime)
                    .HasColumnType("datetime")
                    .HasColumnName("order_finishedTime");
                entity.Property(e => e.OrderId).HasColumnName("OrderID");
                entity.Property(e => e.Reassign)
                    .HasComment("改派	推送司机应单信息：meta中必须包含driverInfo节点中的数据")
                    .HasColumnType("text")
                    .HasColumnName("reassign");
                entity.Property(e => e.ReassignTime)
                    .HasColumnType("datetime")
                    .HasColumnName("reassignTime");
                entity.Property(e => e.Setout)
                    .HasComment("已出发	推送司机出发信息")
                    .HasColumnType("text")
                    .HasColumnName("setout");
                entity.Property(e => e.SetoutTime)
                    .HasColumnType("datetime")
                    .HasColumnName("setoutTime");
                entity.Property(e => e.SysCanceled)
                    .HasComment("系统取消	推送系统取消消息: meta中必须包含customerServiceInfo节点中的数据")
                    .HasColumnType("text")
                    .HasColumnName("sys_canceled");
                entity.Property(e => e.SysCanceledTime)
                    .HasColumnType("datetime")
                    .HasColumnName("sys_canceledTime");
            });

            modelBuilder.Entity<AppointOrderListVisit>(entity =>
            {
                entity.ToTable("AppointOrderList_Visit", tb => tb.HasComment("约车订单回访"));

                entity.HasIndex(e => e.OrderId, "IX_AppointOrderList_Visit").IsUnique();

                entity.HasIndex(e => e.OrderNum, "IX_AppointOrderList_Visit_1").IsUnique();

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Checker)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("回访人");
                entity.Property(e => e.Comment)
                    .HasComment("评价备注")
                    .HasColumnType("text");
                entity.Property(e => e.CommentStar)
                    .HasDefaultValue(3.0)
                    .HasComment("评价星数");
                entity.Property(e => e.GoodsAttitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValueSql("((1))")
                    .HasComment("司机态度");
                entity.Property(e => e.HasAddWechat)
                    .HasDefaultValue(true)
                    .HasComment("是否有添加微信");
                entity.Property(e => e.IsClean)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValueSql("((1))")
                    .HasComment("车辆是否干净");
                entity.Property(e => e.IsOntime)
                    .HasDefaultValue(true)
                    .HasComment("是否准时到达");
                entity.Property(e => e.LuggageHelp)
                    .HasDefaultValue(true)
                    .HasComment("是否有帮忙搬行李");
                entity.Property(e => e.OrderId)
                    .HasComment("对应AppointOrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.ReBuy)
                    .HasDefaultValue(true)
                    .HasComment("是否会再使用");
                entity.Property(e => e.ScopeGenera)
                    .HasDefaultValue(true)
                    .HasComment("是否有推广业务");
                entity.Property(e => e.VisitTime)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("回访时间")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<AppointOrderListZh>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK__AppointO__3214EC27109731AA");

                entity.ToTable("AppointOrderList_ZH");

                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasComment("ID")
                    .HasColumnName("ID");
                entity.Property(e => e.AppointId)
                    .HasComment("接送id")
                    .HasColumnName("AppointID");
                entity.Property(e => e.BookingDate)
                    .HasComment("预定日期时间，传到api时要转成10位时间戳(秒数)")
                    .HasColumnType("datetime")
                    .HasColumnName("bookingDate");
            });

            modelBuilder.Entity<ApporderDispatch>(entity =>
            {
                entity.ToTable("APPOrderDispatch");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasDefaultValueSql("(getdate())");
                entity.Property(e => e.Settime)
                    .HasColumnType("datetime")
                    .HasColumnName("settime");
            });

            modelBuilder.Entity<ApporderDispatchInfo>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToTable("APPOrderDispatch_info");

                entity.Property(e => e.Ordernum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ordernum");
                entity.Property(e => e.Step)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("step");
            });

            modelBuilder.Entity<BalanceUnit>(entity =>
            {
                entity.ToTable("BalanceUnit", tb => tb.HasComment("各商户结算单位"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Address)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("单位地址");
                entity.Property(e => e.BankName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("开户银行");
                entity.Property(e => e.BankNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("银行帐号")
                    .HasColumnName("BankNO");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("所在城市");
                entity.Property(e => e.Corporate)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("法人");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.District)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("地区");
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("所在省份");
                entity.Property(e => e.ShortName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("单位短称");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1；正常  0：停用");
                entity.Property(e => e.Telephone)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系电话");
                entity.Property(e => e.UnitName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("单位全称");
            });

            modelBuilder.Entity<BlackList>(entity =>
            {
                entity.ToTable("BlackList", tb => tb.HasComment("黑名单"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.Idcard)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("IDCard");
                entity.Property(e => e.OpenId)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("OpenID");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.UserId).HasColumnName("UserID");
            });

            modelBuilder.Entity<BookingMessage>(entity =>
            {
                entity.ToTable("BookingMessage", tb => tb.HasComment("预约信息"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BookingEndDate)
                    .HasComment("返程日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.BookingStartDate)
                    .HasComment("出发日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.BookingState).HasComment("回访状态  0：未回访  1：已回访   2：可成交   3：不可成交  4:已成交");
                entity.Property(e => e.CheckDate)
                    .HasComment("回访日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.Checker)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("回访人");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("预约日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("电话");
                entity.Property(e => e.ProductName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("产品名称");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.Remarks)
                    .HasComment("客户备注")
                    .HasColumnType("text");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("记录状态  0：作废  1：正常（默认）");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID，对应UserData.ID")
                    .HasColumnName("UserID");
                entity.Property(e => e.VisitLog)
                    .HasComment("回访历史 yyyy-MM-dd HH:mm+XXX回访;")
                    .HasColumnType("text");
                entity.Property(e => e.VisitRemark)
                    .HasComment("回访备注")
                    .HasColumnType("text");
                entity.Property(e => e.WxOpenId)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("用户OpenId")
                    .HasColumnName("WxOpenID");
            });

            modelBuilder.Entity<BusLineModel>(entity =>
            {
                entity.ToTable("BusLineModel", tb => tb.HasComment("巴士线路模板"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CarLevel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("车辆等级  高三级、高二级、高一级、中级、普通级");
                entity.Property(e => e.CarModel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("巴士类型 特大型、大型、中型、小型");
                entity.Property(e => e.CharteredPrice)
                    .HasComment("包车价格")
                    .HasColumnType("decimal(9, 2)");
                entity.Property(e => e.CompanyId)
                    .HasComment("商户ID，对应Company.ID")
                    .HasColumnName("CompanyID");
                entity.Property(e => e.DisabledArmymanTicketPrice)
                    .HasComment("残疾军人票价")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.FrequencyModel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("班次类型  正班、加班、顶班");
                entity.Property(e => e.FrequencyType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("班次种类  始发、配客");
                entity.Property(e => e.FullTicketMaxPrice)
                    .HasComment("全票价格上限")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.FullTicketPrice)
                    .HasComment("全票执行价")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.GoodsType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasDefaultValue("班车")
                    .HasComment("班车（默认）  专车");
                entity.Property(e => e.HalfTicketPrice)
                    .HasComment("半票价")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.HasPackagePrice).HasComment("是否有往返程价格");
                entity.Property(e => e.IntervalMinute).HasComment("班次间隔时间分钟");
                entity.Property(e => e.IsBusinessBus)
                    .HasDefaultValue(true)
                    .HasComment("是否商务大巴  1:是  0：否");
                entity.Property(e => e.IsGo)
                    .HasDefaultValue(true)
                    .HasComment("是否去程  0：否 返程    1：是 去程（默认）");
                entity.Property(e => e.IsPrivate)
                    .HasDefaultValue(true)
                    .HasComment("True:私有线路，不与其他商户混线。  False:公有线路，可与其他商户混搭。");
                entity.Property(e => e.IsPromotion).HasComment("是否促销线路 0：否（默认正常班次）  1：是");
                entity.Property(e => e.LineName)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("线路名称");
                entity.Property(e => e.LineType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("线路种类  省际、市际、县际、县内、港澳、国际");
                entity.Property(e => e.MaxMember)
                    .HasDefaultValue(1)
                    .HasComment("该班次最大载客数");
                entity.Property(e => e.OriginCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("终点城市");
                entity.Property(e => e.OriginProvince)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("终点省");
                entity.Property(e => e.Price)
                    .HasComment("价格")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.SitType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasDefaultValue("座位")
                    .HasComment("座位类型  座位、卧铺");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常  0：停用  1：正常");
                entity.Property(e => e.StudentTicketPrice)
                    .HasComment("学生票价")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.TotalMinute).HasComment("总时长");
                entity.Property(e => e.TrafficType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("客运类别  直达、普通");
                entity.Property(e => e.TypeId)
                    .HasComment("对应BusLineType.ID")
                    .HasColumnName("TypeID");
                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("对应BusLineType.TypeName");
                entity.Property(e => e.UseNanYueApi).HasComment("使用南粤通API");
                entity.Property(e => e.VipPrice)
                    .HasComment("VIP价格")
                    .HasColumnType("decimal(5, 2)");
            });

            modelBuilder.Entity<BusLineModelBalance>(entity =>
            {
                entity.ToTable("BusLineModel_Balance", tb => tb.HasComment("线路模板对应结算单位"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Amount)
                    .HasComment("单笔结算额")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.BalanceId)
                    .HasComment("结算单位ID，对应Balance.ID")
                    .HasColumnName("BalanceID");
                entity.Property(e => e.BankName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("开户银行");
                entity.Property(e => e.BankNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("银行帐号")
                    .HasColumnName("BankNO");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.Days)
                    .HasDefaultValue(1)
                    .HasComment("结算周期天数");
                entity.Property(e => e.ModelId)
                    .HasComment("模板ID，对应BusLineModel.ID")
                    .HasColumnName("ModelID");
                entity.Property(e => e.ShortName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("结算单位简称");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常、2：停用。");
                entity.Property(e => e.UnitName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("结算单位全称");
            });

            modelBuilder.Entity<BusLineModelPlace>(entity =>
            {
                entity.ToTable("BusLineModel_Place", tb => tb.HasComment("线路模板－途经站点"));

                entity.HasIndex(e => new { e.ModelId, e.Status, e.NanYueStationId }, "PriKey");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Address)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("具体位置");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("城市");
                entity.Property(e => e.CompanyId)
                    .HasComment("公司ID，对应 Company.ID")
                    .HasColumnName("CompanyID");
                entity.Property(e => e.District)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("镇区");
                entity.Property(e => e.EarlyMinutes).HasComment("提早时间（分钟）");
                entity.Property(e => e.IsGetOff)
                    .HasDefaultValue(true)
                    .HasComment("是否可下站  默认1可以  0：不可  1：可以");
                entity.Property(e => e.IsGetOn)
                    .HasDefaultValue(true)
                    .HasComment("是否可上站  默认1可以  0：不可  1：可以");
                entity.Property(e => e.Latitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("纬度  竖轴  Y");
                entity.Property(e => e.Longitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("经度 横轴 X");
                entity.Property(e => e.ModelId).HasColumnName("ModelID");
                entity.Property(e => e.NanYueStationId)
                    .HasComment("南粤通站点ID")
                    .HasColumnName("NanYueStationID");
                entity.Property(e => e.OriCity)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("站点所在城市");
                entity.Property(e => e.PlaceName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("地点名称");
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("省份");
                entity.Property(e => e.StationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("站点编号");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("站点状态  0：停用  1：正常（默认）");
            });

            modelBuilder.Entity<BusLineModelPlacePrice>(entity =>
            {
                entity.ToTable("BusLineModel_PlacePrice", tb => tb.HasComment("班次模板价格表"));

                entity.HasIndex(e => new { e.ModelId, e.GetOnStation, e.GetOffStation, e.Status }, "SearchKey");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AdultPackagePrice)
                    .HasComment("成从套票价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.AdultPrice)
                    .HasComment("成人价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.AdultSubsidyPrice)
                    .HasComment("成人地空、补贴价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.AdultVipPrice)
                    .HasComment("成人VIP会员价格")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.BabyPrice)
                    .HasComment("婴儿价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.ChildPackagePrice)
                    .HasComment("小童套票价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.ChildPrice)
                    .HasComment("小童价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.ChildSubsidyPrice)
                    .HasComment("儿童补贴、地空价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.CounterStationServicePrice)
                    .HasComment("前台站场服务费")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.DisArmPackagePrice)
                    .HasComment("军残套票价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.DisArmPrice)
                    .HasComment("军残价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.EndDate)
                    .HasComment("结束日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.EndTime)
                    .HasDefaultValue(new TimeOnly(23, 59, 0))
                    .HasComment("结束时间");
                entity.Property(e => e.GetOffStation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("对应BusLineModel_Place.PlaceName");
                entity.Property(e => e.GetOnStation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("上车站点");
                entity.Property(e => e.HasPackagePrice).HasComment("是否有往返程价格");
                entity.Property(e => e.IsDefaultPrice).HasComment("是否默认价格");
                entity.Property(e => e.ModelId)
                    .HasComment("对应BusLineModel.ID")
                    .HasColumnName("ModelID");
                entity.Property(e => e.OneTicketDuePrice)
                    .HasComment("一票通双成人价100*2   100")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.OneTicketFamilyPrice)
                    .HasComment("一票通家庭票100*2+80*2    60*2+20*2")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.OneTicketPrice)
                    .HasComment("一票通价格   60")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.OneTicketYoundOld)
                    .HasComment("一票通老人小孩价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.PriceDes)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("价格说明");
                entity.Property(e => e.StartDate)
                    .HasComment("开始日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.StartTime).HasComment("开始时间");
                entity.Property(e => e.StationServicePrice)
                    .HasComment("站场服务费")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用 1：正常（默认）");
                entity.Property(e => e.StudentPrice)
                    .HasComment("学生票价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.TotalKilo)
                    .HasComment("行程总公里数")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.TotalMinute).HasComment("乘车总时长（分钟）");
                entity.Property(e => e.UseOneTicket).HasComment("使用一票通套票价 默认0不使用  1使用");
            });

            modelBuilder.Entity<BusLineType>(entity =>
            {
                entity.ToTable("BusLineType", tb => tb.HasComment("巴士线路类型"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.State)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常  0：停用  1：正常");
                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValue("类型名称  如：机场快线  新能源接送巴士");
            });

            modelBuilder.Entity<BusList>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK_Bus");

                entity.ToTable("BusList", tb => tb.HasComment("巴士表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CarLevel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("车辆等级  高三级、高二级、高一级、中级、普通级");
                entity.Property(e => e.CarModel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("巴士类型 特大型、大型、中型、小型");
                entity.Property(e => e.CarNo)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("号牌号码")
                    .HasColumnName("CarNO");
                entity.Property(e => e.IsBusinessBus)
                    .HasDefaultValue(true)
                    .HasComment("是否商务大巴  1:是  0：否");
                entity.Property(e => e.IsNewEnergy).HasComment("是否新能源巴士 默认0否  1：是   0：否");
                entity.Property(e => e.MaxMember).HasComment("最大载客");
                entity.Property(e => e.Nocolor)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("号牌颜色")
                    .HasColumnName("NOColor");
                entity.Property(e => e.SitType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasDefaultValue("座位")
                    .HasComment("座位类型  座位、卧铺");
                entity.Property(e => e.Status).HasDefaultValue(true);
            });

            modelBuilder.Entity<Business>(entity =>
            {
                entity.ToTable("Business", tb => tb.HasComment("商户表"));

                entity.HasIndex(e => e.ShortName, "IX_Business").IsUnique();

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Address)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("详细地址");
                entity.Property(e => e.BankName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("开户银行");
                entity.Property(e => e.BankNo)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("银行帐号")
                    .HasColumnName("BankNO");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("城市");
                entity.Property(e => e.CnshortName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("中文简称")
                    .HasColumnName("CNShortName");
                entity.Property(e => e.CompanyName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("商户名称");
                entity.Property(e => e.District)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("镇区");
                entity.Property(e => e.Latitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("纬度  竖轴  Y");
                entity.Property(e => e.LogoUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);
                entity.Property(e => e.Longitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("经度 横轴 X");
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("省份");
                entity.Property(e => e.RealC).HasColumnType("money");
                entity.Property(e => e.RegisterCapital)
                    .HasComment("注册资本")
                    .HasColumnType("decimal(18, 0)");
                entity.Property(e => e.RegisterCurrency)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("注册币种");
                entity.Property(e => e.ShortName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("简称 例：中山候机楼");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用  1：正常  默认1");
            });

            modelBuilder.Entity<BusinessAddressList>(entity =>
            {
                entity.ToTable("Business_AddressList", tb => tb.HasComment("商户地址列表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Address)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("详细地址");
                entity.Property(e => e.Bonus)
                    .HasComment("抽成 默认0")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.BusinessId).HasColumnName("BusinessID");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("城市");
                entity.Property(e => e.District)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("镇区");
                entity.Property(e => e.IsDefault)
                    .HasDefaultValue(true)
                    .HasComment("是否默认 1：是 0：否");
                entity.Property(e => e.Latitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("纬度  竖轴  Y");
                entity.Property(e => e.Longitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("经度 横轴 X");
                entity.Property(e => e.MarkName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("省份");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用 1：正常");
                entity.Property(e => e.Subsidy)
                    .HasComment("补贴额度  默认0")
                    .HasColumnType("decimal(7, 2)");
            });

            modelBuilder.Entity<BusinessAirLine>(entity =>
            {
                entity.ToTable("Business_AirLine", tb => tb.HasComment("商户绑定航司大客户号"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AirCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("航司代码");
                entity.Property(e => e.AirCompany)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("航司名称");
                entity.Property(e => e.BusinessId)
                    .HasComment("对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.License)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("大客户号");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("记录状态  0：作废  1：正常");
            });

            modelBuilder.Entity<BusinessDepart>(entity =>
            {
                entity.ToTable("Business_Depart", tb => tb.HasComment("部门表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.DepartLevel)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("层级结构 （0.1.1）");
                entity.Property(e => e.DepartName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("部门名称");
                entity.Property(e => e.ParentId).HasComment("上级部门id");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1：正常   0：停用");
            });

            modelBuilder.Entity<BusinessDutyList>(entity =>
            {
                entity.ToTable("Business_DutyList", tb => tb.HasComment("商户上班时间表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.DownEndTime)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("下午班结束时间");
                entity.Property(e => e.DownStartTime)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("下午班开始时间");
                entity.Property(e => e.DutyName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("班名称 早班、晚班，D1之类");
                entity.Property(e => e.JobContent)
                    .HasComment("工作内容与该班描述")
                    .HasColumnType("text");
                entity.Property(e => e.UpEndTime)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("上午班结束时间");
                entity.Property(e => e.UpStartTime)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("上午班开始时间");
            });

            modelBuilder.Entity<BusinessJobGrade>(entity =>
            {
                entity.ToTable("Business_JobGrade", tb => tb.HasComment("商户职级"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AppraiseMonths).HasComment("职级考核时长，月为单位。");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.LevelName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("职级名称");
                entity.Property(e => e.Wages)
                    .HasComment("基本工资")
                    .HasColumnType("decimal(7, 2)");
            });

            modelBuilder.Entity<BusinessJobGradeInclude>(entity =>
            {
                entity.ToTable("Business_JobGradeInclude", tb => tb.HasComment("职级管理范围"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.ChildLevel)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("从属职级");
                entity.Property(e => e.MainLevel)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("主职级");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1：正常  0：停用");
            });

            modelBuilder.Entity<BusinessJobGradeKpi>(entity =>
            {
                entity.ToTable("Business_JobGradeKPI", tb => tb.HasComment("职位考核列表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.Kpiid)
                    .HasComment("考核项ID，对应Business_KPIList.ID")
                    .HasColumnName("KPIID");
                entity.Property(e => e.Kpiname)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("考核项名称")
                    .HasColumnName("KPIName");
                entity.Property(e => e.LevelName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("职级名称");
                entity.Property(e => e.MaxScore).HasComment("最高分");
                entity.Property(e => e.MinScore).HasComment("最低分");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1：正常  0：停用");
            });

            modelBuilder.Entity<BusinessKpilist>(entity =>
            {
                entity.ToTable("Business_KPIList", tb => tb.HasComment("考核内容列表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.Kpiname)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("考核项名称")
                    .HasColumnName("KPIName");
                entity.Property(e => e.MaxScore).HasComment("最高分数");
                entity.Property(e => e.MinScore).HasComment("最低分数");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1：正常  0：作废");
            });

            modelBuilder.Entity<BusinessPickupPrice>(entity =>
            {
                entity.ToTable("Business_PickupPrice", tb => tb.HasComment("商户接送价"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BackOtprice)
                    .HasComment("回程特殊时间点加收服务费")
                    .HasColumnType("decimal(6, 2)")
                    .HasColumnName("BackOTPrice");
                entity.Property(e => e.BackPrice)
                    .HasComment("回程一般价格")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.BackVipPrice)
                    .HasComment("回程VIP价格")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("城市");
                entity.Property(e => e.District)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("镇区");
                entity.Property(e => e.Otprice)
                    .HasComment("特殊时间点加收服务费")
                    .HasColumnType("decimal(6, 2)")
                    .HasColumnName("OTPrice");
                entity.Property(e => e.Price)
                    .HasComment("一般价格")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("省份");
                entity.Property(e => e.SignId)
                    .HasComment("商户地标点ID，对应Business_AddressList.ID")
                    .HasColumnName("SignID");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1：启用  2：停用");
                entity.Property(e => e.VipPrice)
                    .HasComment("VIP价格")
                    .HasColumnType("decimal(6, 2)");
            });

            modelBuilder.Entity<BusinessStaff>(entity =>
            {
                entity.ToTable("Business_Staff", tb => tb.HasComment("商户员工表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AgeType)
                    .HasDefaultValue(1)
                    .HasComment("1：成人  2：儿童   3：婴儿");
                entity.Property(e => e.Birthday)
                    .HasComment("生日")
                    .HasColumnType("datetime");
                entity.Property(e => e.BusinessId)
                    .HasComment("UserData.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CardNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("身份证")
                    .HasColumnName("CardNO");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("电话");
                entity.Property(e => e.PapersType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件类型   身份证、学生证、残疾军人证，护照");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.Sex)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("性别");
                entity.Property(e => e.StaffState)
                    .HasDefaultValue(1)
                    .HasComment("员工状态  0：离职  1：在职  ");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1：正常   0：停用");
            });

            modelBuilder.Entity<BusinessStaffKpiscore>(entity =>
            {
                entity.ToTable("Business_StaffKPIScore", tb => tb.HasComment("员工考核记录表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.Description)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("评语");
                entity.Property(e => e.Kpiid)
                    .HasComment("考核项ID，对应Business_JobGradeKPI.ID")
                    .HasColumnName("KPIID");
                entity.Property(e => e.Kpiname)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("考核项名称，对应Business_JobGradeKPI.KPIName")
                    .HasColumnName("KPIName");
                entity.Property(e => e.ManagerId)
                    .HasComment("评分人ID")
                    .HasColumnName("ManagerID");
                entity.Property(e => e.ManagerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("考核人姓名");
                entity.Property(e => e.Score).HasComment("得分 可为小数");
                entity.Property(e => e.ScoreDate)
                    .HasComment("评分日")
                    .HasColumnType("datetime");
                entity.Property(e => e.StaffId)
                    .HasComment("被考核人ID")
                    .HasColumnName("StaffID");
                entity.Property(e => e.StaffName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("被考核人姓名");
            });

            modelBuilder.Entity<CardList>(entity =>
            {
                entity.ToTable("CardList");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CardPrice)
                    .HasComment("卡面金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.CardTitle)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("票名称");
                entity.Property(e => e.EndDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.Maxcount).HasColumnName("MAXCount");
                entity.Property(e => e.Price)
                    .HasComment("优惠价格要求")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Remarks).HasColumnType("text");
                entity.Property(e => e.StartDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<Company>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK__Company__3214EC273EFD1AD8");

                entity.ToTable("Company", tb => tb.HasComment("公司表"));

                entity.HasIndex(e => new { e.Token, e.Account, e.AuthCode }, "BUSINESS");

                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("ID");
                entity.Property(e => e.Account)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("公司账户");
                entity.Property(e => e.Address)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("详细地址");
                entity.Property(e => e.AuthCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("验证密码");
                entity.Property(e => e.CompanyName)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("公司名称");
                entity.Property(e => e.CompanyUrl)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("公司网址");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Phone)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("联系电话");
                entity.Property(e => e.Principal)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("负责人");
                entity.Property(e => e.ShortName)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("简称");
                entity.Property(e => e.Status).HasComment("状态：1 正常  0 作废");
                entity.Property(e => e.Token)
                    .HasMaxLength(64)
                    .IsUnicode(false)
                    .HasComment("令牌");
                entity.Property(e => e.UpdateId)
                    .HasComment("修改人")
                    .HasColumnName("Update_ID");
                entity.Property(e => e.UpdateTime)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("修改时间")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<Department>(entity =>
            {
                entity.ToTable("Department", tb => tb.HasComment("部门表"));

                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("ID");
                entity.Property(e => e.CompanyId)
                    .HasComment("公司id")
                    .HasColumnName("Company_ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.DepLevel)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("部门级别");
                entity.Property(e => e.DepName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("部门名称");
                entity.Property(e => e.Remarks).HasColumnType("text");
                entity.Property(e => e.Status).HasComment("状态");
                entity.Property(e => e.UpdateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("修改时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.UpdateUserId)
                    .HasMaxLength(10)
                    .IsFixedLength()
                    .HasColumnName("Update_UserID");
            });

            modelBuilder.Entity<DistributionUserAuthority>(entity =>
            {
                entity.ToTable("DistributionUserAuthority");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.DistributionUserId).HasColumnName("DistributionUserID");
                entity.Property(e => e.MenuName)
                    .HasMaxLength(255)
                    .IsUnicode(false);
                entity.Property(e => e.OperationDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<DistributionUserInfo>(entity =>
            {
                entity.ToTable("DistributionUserInfo");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CompanyId).HasComment("公司id");
                entity.Property(e => e.CreateDate).HasColumnType("datetime");
                entity.Property(e => e.LoingName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("登录名");
                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("名称");
                entity.Property(e => e.OperationDate).HasColumnType("datetime");
                entity.Property(e => e.Password)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("密码")
                    .HasColumnName("password");
                entity.Property(e => e.Token)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("令牌唯一标识");
            });

            modelBuilder.Entity<DloungeSalesTicketSystemLoginfo>(entity =>
            {
                entity.ToTable("DLoungeSalesTicketSystemLoginfo");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.LogDate)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.LogInfo).HasColumnType("text");
                entity.Property(e => e.LogType)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.UserName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Driver>(entity =>
            {
                entity.ToTable("Driver", tb => tb.HasComment("司机表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CarNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("对应车牌号")
                    .HasColumnName("CarNO");
                entity.Property(e => e.Certified)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("从业资格证号");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("跓点城市");
                entity.Property(e => e.CompanyAddress)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("公司地址");
                entity.Property(e => e.District)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("跓点行政区");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机姓名");
                entity.Property(e => e.HeadPic)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("司机头像图片");
                entity.Property(e => e.HomeAddress)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("家庭住址、跓点地址");
                entity.Property(e => e.Idcard)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("身份证号")
                    .HasColumnName("IDCard");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("手机电话");
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("跓点省份");
                entity.Property(e => e.Sex)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("性别");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常  1：正常  0：停用");
                entity.Property(e => e.SysAcId)
                    .HasComment("对应SysAccount.ID")
                    .HasColumnName("SysAcID");
                entity.Property(e => e.WxOpenId)
                    .HasMaxLength(80)
                    .IsUnicode(false)
                    .HasColumnName("WxOpenID");
            });

            modelBuilder.Entity<Emp>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK__Emp__3214EC270CBAE877");

                entity.ToTable("Emp", tb => tb.HasComment("员工表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Address)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("现居住地址");
                entity.Property(e => e.Age).HasComment("员工年龄");
                entity.Property(e => e.CardId)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("身份证号码");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.DepId)
                    .HasComment("部门ID")
                    .HasColumnName("Dep_ID");
                entity.Property(e => e.EmpName)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("员工姓名");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("联系电话");
                entity.Property(e => e.Password)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态：1 正常  0 作废");
                entity.Property(e => e.Token)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("Token验证");
                entity.Property(e => e.UpdateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("更新时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.UpdateEmpId)
                    .HasComment("更新人")
                    .HasColumnName("Update_EmpID");
                entity.Property(e => e.UserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("后台账号");
                entity.Property(e => e.WxOpenId)
                    .HasMaxLength(300)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<EmpRole>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK__Emp_Role__3214EC2754EC5BF7");

                entity.ToTable("Emp_Role", tb => tb.HasComment("角色权限表"));

                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.EmpId)
                    .HasComment("员工ID")
                    .HasColumnName("Emp_ID");
                entity.Property(e => e.RoleId)
                    .HasComment("角色ID")
                    .HasColumnName("Role_ID");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态：1 正常  0 作废");
                entity.Property(e => e.UpdateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("修改时间")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<EmpSysMenuList>(entity =>
            {
                entity.ToTable("Emp_SysMenuList");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.EmpId).HasColumnName("Emp_ID");
                entity.Property(e => e.SysMenuId).HasColumnName("SysMenu_ID");
            });

            modelBuilder.Entity<EventOrder>(entity =>
            {
                entity.ToTable("EventOrder", tb => tb.HasComment("活动订单"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CarNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("CarNO");
                entity.Property(e => e.CheckTime)
                    .HasComment("使用日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.CredentialsUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("上传证件连接");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.EndCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("到达城市");
                entity.Property(e => e.EventState)
                    .HasDefaultValue(1)
                    .HasComment("状态 0：审核不过  1：审核中  2：南航审核完毕  3：客服确认   4：使用成功");
                entity.Property(e => e.FlightDate)
                    .HasComment("起飞时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.FlightNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("航班号");
                entity.Property(e => e.GoodsName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("产品名");
                entity.Property(e => e.IsGo)
                    .HasDefaultValue(true)
                    .HasComment("是否去程");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系电话");
                entity.Property(e => e.Remarks)
                    .HasComment("备注")
                    .HasColumnType("text");
                entity.Property(e => e.SetDate)
                    .HasComment("出发日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.StartCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("起飞城市");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("记录状态  0：作废   1：正常");
                entity.Property(e => e.SupportGoods)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("提供产品    免票巴士  专车接送");
                entity.Property(e => e.SysLog)
                    .HasComment("系统记录")
                    .HasColumnType("text");
                entity.Property(e => e.TicketNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("票号");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID，对应UserData.ID")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<ExtraService>(entity =>
            {
                entity.ToTable("ExtraService", tb => tb.HasComment("服务列表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.DefaultUsed)
                    .HasDefaultValue(true)
                    .HasComment("默认下单后生效，不作退款。  0：否  1：是");
                entity.Property(e => e.Description)
                    .HasComment("描述")
                    .HasColumnType("text");
                entity.Property(e => e.EndDate)
                    .HasComment("结束时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.GroupName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("组名  同组里只可以单选并以并列列表显示，没组名则单独显示。");
                entity.Property(e => e.IconUrl)
                    .HasMaxLength(70)
                    .IsUnicode(false)
                    .HasComment("图标路径");
                entity.Property(e => e.ImageUrl)
                    .HasMaxLength(70)
                    .IsUnicode(false)
                    .HasComment("图片路径");
                entity.Property(e => e.IsSingle)
                    .HasDefaultValue(true)
                    .HasComment("是否对个人");
                entity.Property(e => e.LimitCount).HasComment("数量限量");
                entity.Property(e => e.LimitType).HasComment("限量形式  0：按天  1：按月  2：按年");
                entity.Property(e => e.Price)
                    .HasComment("价格")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.ServiceName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("服务名称");
                entity.Property(e => e.StartDate)
                    .HasComment("开始时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  1：正常（默认）  0：停用");
                entity.Property(e => e.VipPrice)
                    .HasComment("VIP价格")
                    .HasColumnType("decimal(6, 2)");
            });

            modelBuilder.Entity<FlightConfig>(entity =>
            {
                entity.ToTable("FlightConfig", tb => tb.HasComment("系统设置"));

                entity.HasIndex(e => e.ConfigName, "IX_FlightConfig").IsUnique();

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ConfigName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("设置名称");
                entity.Property(e => e.OnOff)
                    .HasDefaultValue(true)
                    .HasComment("开关   ");
            });

            modelBuilder.Entity<FlightOrderList>(entity =>
            {
                entity.ToTable("FlightOrderList", tb => tb.HasComment("机票订单"));

                entity.HasIndex(e => new { e.OrderNum, e.ApiOrderNum }, "IX_FlightOrderList").IsUnique();

                entity.HasIndex(e => new { e.UserId, e.CreateDate, e.Status, e.OrderState }, "UserID");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ApiData)
                    .HasComment("接口数据")
                    .HasColumnType("text");
                entity.Property(e => e.ApiOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("胤之旅订单号");
                entity.Property(e => e.BackDate)
                    .HasComment("返程日期  FlightType=2时有值")
                    .HasColumnType("datetime");
                entity.Property(e => e.BackFlightNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("返程航班号  FlightType=2时有值");
                entity.Property(e => e.BillingFee)
                    .HasComment("开票费")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.CabinRank).HasComment("舱位等级 0=不限 1=头等舱 2=公务舱 3=经济舱");
                entity.Property(e => e.ChangeTimes).HasComment("变更次数");
                entity.Property(e => e.Contact)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("联系人");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("下单时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.DepDate)
                    .HasComment("出发日期，格式yyyy-MM-dd")
                    .HasColumnType("datetime");
                entity.Property(e => e.DepFlightNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("去程航班号");
                entity.Property(e => e.DesCity)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("出发城市");
                entity.Property(e => e.DesCityPortCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("出发城市或机场三字码	");
                entity.Property(e => e.DirectFlight).HasComment("是否直飞 0=不限 1=是 2=其它");
                entity.Property(e => e.Email)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("联系人邮箱");
                entity.Property(e => e.FlightType).HasComment("航程类型 1=单程，2=往返");
                entity.Property(e => e.FormChannel).HasComment("渠道 1：胤之旅  2：中航信");
                entity.Property(e => e.FromBusinessId)
                    .HasDefaultValue(2)
                    .HasComment("订单来源")
                    .HasColumnName("FromBusinessID");
                entity.Property(e => e.FromParams)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("客户来源");
                entity.Property(e => e.HasChange).HasComment("是否有更改");
                entity.Property(e => e.HasFreeTicket).HasComment("该机票是否包含车票");
                entity.Property(e => e.IsIntercept).HasComment("是否拦截订单");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人电话");
                entity.Property(e => e.NeedInvoice).HasComment("是否需要报销凭证  0:否（默认）  1：是");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("订单号  FyyyyMMddHHmm+Count");
                entity.Property(e => e.OrderState).HasComment("订单状态  0：已下单，未支付  1：已成功支付  2：订单已成功出票   3：申请退款   4：退款成功");
                entity.Property(e => e.OriCity)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("到达城市");
                entity.Property(e => e.OriCityPortCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("到达城市或机场三字码	");
                entity.Property(e => e.PayTime)
                    .HasComment("支付完成时间	")
                    .HasColumnType("datetime");
                entity.Property(e => e.PayerAccount)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("付款账号	");
                entity.Property(e => e.PaytradeNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("支付交易号	");
                entity.Property(e => e.PsgCount)
                    .HasDefaultValue(1)
                    .HasComment("旅客人数");
                entity.Property(e => e.PsgType).HasComment("乘客类型，1-成人 2-儿童 3-成人+儿童  (暂不支持儿童单)");
                entity.Property(e => e.Qq)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人QQ")
                    .HasColumnName("QQ");
                entity.Property(e => e.Remark)
                    .HasComment("备注")
                    .HasColumnType("text");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("订单状态  0：作废  1：正常（默认）");
                entity.Property(e => e.SysLog)
                    .HasComment("系统记录")
                    .HasColumnType("text");
                entity.Property(e => e.TicketOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("若含车票则此字段保存车票订单号");
                entity.Property(e => e.TotalAirportTax)
                    .HasComment("燃油总计	")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.TotalAmount)
                    .HasComment("订单总金额")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.TotalCharge)
                    .HasComment("总手续费")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.TotalFuelTaax)
                    .HasComment("机建总计")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.TotalPay)
                    .HasComment("胤之旅订单票面总价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.TotalPrice)
                    .HasComment("订单票面总价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.UseLicense).HasComment("是否有使用大客户政策  0：否  1：是");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<FlightOrderListChangeOrder>(entity =>
            {
                entity.ToTable("FlightOrderList_ChangeOrder", tb => tb.HasComment("机票改班订单"));

                entity.HasIndex(e => new { e.OrderId, e.OrderNum }, "Order");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ApiChangeOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.ApiData)
                    .HasComment("接口反馈数据")
                    .HasColumnType("text");
                entity.Property(e => e.ApplyChangeTime)
                    .HasComment("申请变更时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.ChangePrice)
                    .HasDefaultValue(0m)
                    .HasComment("补款金额")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.ChangeStatus)
                    .HasDefaultValue(1)
                    .HasComment("变更状态：1.处理中,2.处理中(待确认补款金额),3.需补款,4.已补款,5.改签成功,6.改签失败,7.已取消");
                entity.Property(e => e.ChangeType).HasComment("变更类型1-改期，2-升舱");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.FromOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("对应FlightOrderList.OrderNum");
                entity.Property(e => e.OrderId)
                    .HasComment("主机票订单ID，对应FlightOrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("变更单号  FC+yyyyMMddHHmm+UserID");
            });

            modelBuilder.Entity<FlightOrderListPassenger>(entity =>
            {
                entity.ToTable("FlightOrderList_Passenger", tb => tb.HasComment("机票订单乘客列表"));

                entity.HasIndex(e => e.OrderId, "Order");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Birthday).HasColumnType("datetime");
                entity.Property(e => e.CardNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件号")
                    .HasColumnName("CardNO");
                entity.Property(e => e.Gender).HasComment("性别1，男2 女");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("电话");
                entity.Property(e => e.OrderId)
                    .HasComment("对应OrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.PapersType).HasComment("1-身份证 2-护照 4-港澳通行证 5-台胞证 6-台湾通行证 7-回乡证 8-军官证 9-其他");
                entity.Property(e => e.PnrCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("PNR编码");
                entity.Property(e => e.PsgName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.PsgType).HasComment("乘机人类型 1 成人 2 儿童");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态 默认1正常 0：作废  1：正常");
            });

            modelBuilder.Entity<FlightOrderListPsgSegment>(entity =>
            {
                entity.ToTable("FlightOrderList_PsgSegment", tb => tb.HasComment("机票订单乘客航段"));

                entity.HasIndex(e => new { e.OrderId, e.PsgId }, "Order");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ArrAirportCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("到达机场三字码	");
                entity.Property(e => e.ArrAirportName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("到达机场名称	");
                entity.Property(e => e.ArrDate)
                    .HasComment("抵达日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.CabinCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("舱位代码	");
                entity.Property(e => e.DepAirportCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("出发机场三字码	");
                entity.Property(e => e.DepAirportName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("出发机场名称	");
                entity.Property(e => e.DepDate)
                    .HasComment("航班日期	")
                    .HasColumnType("datetime");
                entity.Property(e => e.FlightNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("航班号	");
                entity.Property(e => e.OrderId).HasColumnName("OrderID");
                entity.Property(e => e.PolicyData)
                    .HasComment("政策信息")
                    .HasColumnType("text");
                entity.Property(e => e.PolicyId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("政策ID")
                    .HasColumnName("PolicyID");
                entity.Property(e => e.PsgId)
                    .HasComment("对应FlightOrderList_Passenger.ID")
                    .HasColumnName("PsgID");
                entity.Property(e => e.SegState).HasComment("航段状态   0：作废  1：正常  2：已乘   3：更改  4：退票");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：作废  1：正常（默认）");
                entity.Property(e => e.TicketNumber)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("票号");
            });

            modelBuilder.Entity<FlightOrderListRefundOrder>(entity =>
            {
                entity.ToTable("FlightOrderList_RefundOrder", tb => tb.HasComment("机票退款单"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ApiData)
                    .HasComment("接口反馈数据")
                    .HasColumnType("text");
                entity.Property(e => e.ApiRefundOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.ApplyRefundTime)
                    .HasComment("申请退票时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.FromOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("对应FlightOrderList.OrderNum");
                entity.Property(e => e.OrderId)
                    .HasComment("主机票订单ID，对应FlightOrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("退款单号  FR+yyyyMMddHHmm+UserID");
                entity.Property(e => e.RefundPrice)
                    .HasDefaultValue(0m)
                    .HasComment("退款金额")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.RefundStatus).HasComment("退票订单状态 1.申请中 2.待确认 3.已确认 4.处理中 5.退票成功 6.退票失败");
                entity.Property(e => e.Remark)
                    .HasComment("退款备注")
                    .HasColumnType("text");
            });

            modelBuilder.Entity<FlightPsgInfo>(entity =>
            {
                entity.ToTable("FlightPsgInfo", tb => tb.HasComment("旅客乘机信息记录表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AirLine)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("航司代码");
                entity.Property(e => e.Cabin)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("舱位代码");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.DepCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("到达城市");
                entity.Property(e => e.DepCityPortCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("到达目的地编码");
                entity.Property(e => e.DepDate)
                    .HasComment("出发日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.FlightNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("航班号");
                entity.Property(e => e.Idcard)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("IDCard");
                entity.Property(e => e.OriCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("出发城市");
                entity.Property(e => e.OriCityPortCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("出发城市编码");
                entity.Property(e => e.Pnr)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("PNR代码")
                    .HasColumnName("PNR");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Remark)
                    .HasComment("备注")
                    .HasColumnType("text");
                entity.Property(e => e.TicketNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("票号");
            });

            modelBuilder.Entity<Frequency>(entity =>
            {
                entity.ToTable("Frequency", tb => tb.HasComment("班次表"));

                entity.HasIndex(e => new { e.ModelId, e.TypeId, e.CompanyId, e.FreNumber }, "IX_Frequency");

                entity.HasIndex(e => new { e.SetDate, e.SetTime, e.Status, e.IsPickup }, "Time");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Adult).HasComment("成人数");
                entity.Property(e => e.Baby).HasComment("婴儿数");
                entity.Property(e => e.CarId)
                    .HasComment("对应BusList.ID")
                    .HasColumnName("CarID");
                entity.Property(e => e.CarLevel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("车辆等级  高三级、高二级、高一级、中级、普通级");
                entity.Property(e => e.CarModel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("巴士类型 特大型、大型、中型、小型");
                entity.Property(e => e.CarNo)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("车牌号码")
                    .HasColumnName("CarNO");
                entity.Property(e => e.CharteredPrice)
                    .HasComment("包车价格")
                    .HasColumnType("decimal(9, 2)");
                entity.Property(e => e.CheckState).HasComment("安检验票状态  0：候车中  1：开始安检验票");
                entity.Property(e => e.Child).HasComment("小童数");
                entity.Property(e => e.CompanyId)
                    .HasComment("商户ID，对应Company.ID")
                    .HasColumnName("CompanyID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.DepartStationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("空港接口出发站点以销定产")
                    .HasColumnName("departStationCode");
                entity.Property(e => e.DestinationStationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("空港接口到达站点编码")
                    .HasColumnName("destinationStationCode");
                entity.Property(e => e.DisabledArmymanTicketPrice)
                    .HasComment("残疾军人票价")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.DriverId)
                    .HasComment("对应Driver.ID")
                    .HasColumnName("DriverID");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机姓名");
                entity.Property(e => e.FreNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("班次号");
                entity.Property(e => e.FrequencyModel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("班次类型  正班、加班、顶班");
                entity.Property(e => e.FrequencyType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("班次种类  始发、配客");
                entity.Property(e => e.FromAppointOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("从AppointOrderList.OrderNum生成的副线路");
                entity.Property(e => e.FullTicketMaxPrice)
                    .HasComment("全票价格上限")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.FullTicketPrice)
                    .HasComment("全票执行价")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.GoodsType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasDefaultValue("班车")
                    .HasComment("班车（默认）  专车");
                entity.Property(e => e.HalfTicketPrice)
                    .HasComment("半票价")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.IntervalMinute).HasComment("班次间隔（分钟）");
                entity.Property(e => e.IsBusinessBus)
                    .HasDefaultValue(true)
                    .HasComment("是否商务大巴  1:是  0：否");
                entity.Property(e => e.IsFinished).HasComment("是否已上传到交通局服务器");
                entity.Property(e => e.IsGo)
                    .HasDefaultValue(true)
                    .HasComment("是否去程  0：否 返程    1：是 去程（默认）");
                entity.Property(e => e.IsPickup).HasComment("是否为可接送班次  默认0否   1是");
                entity.Property(e => e.IsPrivate)
                    .HasDefaultValue(true)
                    .HasComment("True:私有线路，不与其他商户混线。  False:公有线路，可与其他商户混搭。");
                entity.Property(e => e.IsPromotion).HasComment("是否促销线路 0：否（默认正常班次）  1：是");
                entity.Property(e => e.LineName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("线路名称");
                entity.Property(e => e.LineType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("线路种类  省际、市际、县际、县内、港澳、国际");
                entity.Property(e => e.MaxMember).HasComment("最大乘客数");
                entity.Property(e => e.ModelId)
                    .HasComment("模板ID  对应BusLineModel.ID")
                    .HasColumnName("ModelID");
                entity.Property(e => e.ModelPlaceId)
                    .HasDefaultValue(0)
                    .HasColumnName("ModelPlaceID");
                entity.Property(e => e.NanYueHashId)
                    .HasComment("南粤通线路唯一ID")
                    .HasColumnName("NanYueHashID");
                entity.Property(e => e.NowMember).HasComment("当前乘客数");
                entity.Property(e => e.OriginCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("终点城市");
                entity.Property(e => e.OriginProvince)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("终点省");
                entity.Property(e => e.OriginStationCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("空港接口原站点编码")
                    .HasColumnName("originStationCode");
                entity.Property(e => e.Price)
                    .HasComment("票价")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.Remarks)
                    .HasComment("线路备注")
                    .HasColumnType("text");
                entity.Property(e => e.RunsCode)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("空港接口runsCode")
                    .HasColumnName("runsCode");
                entity.Property(e => e.SetDate)
                    .HasComment("出发日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.SetTime)
                    .HasComment("出发时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.SitType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasDefaultValue("座位")
                    .HasComment("座位类型  座位、卧铺");
                entity.Property(e => e.StationServicePrice)
                    .HasComment("站场服务费")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("班次状态  默认1：正常  0：作废");
                entity.Property(e => e.StudentTicketPrice)
                    .HasComment("学生票价")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.TotalKilo)
                    .HasComment("行程总公里数")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.TotalMinute).HasComment("乘车总时长（分钟）");
                entity.Property(e => e.TrafficType)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("客运类别  直达、普通");
                entity.Property(e => e.TypeId)
                    .HasComment("类型ID  对应BusLineType.ID")
                    .HasColumnName("TypeID");
                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("线路类型名称  对应BusLineType.TypeName");
                entity.Property(e => e.UseNanYueApi).HasComment("使用南粤通API");
                entity.Property(e => e.VipPrice)
                    .HasComment("VIP价格")
                    .HasColumnType("decimal(5, 2)");
            });

            modelBuilder.Entity<FrequencyNanYuePlace>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK__Frequenc__3214EC271467C28E");

                entity.ToTable("Frequency_NanYuePlace");

                entity.HasIndex(e => new { e.FrequencyId, e.ModelPlaceId }, "PriKey");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.FrequencyId)
                    .HasComment("班次ID")
                    .HasColumnName("Frequency_ID");
                entity.Property(e => e.ModelPlaceId)
                    .HasComment("BusLineModel_Place.ID")
                    .HasColumnName("Model_PlaceID");
                entity.Property(e => e.NanYueFreNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("南粤通班次号");
                entity.Property(e => e.NanYueHashId)
                    .HasComment("南粤通线路唯一ID")
                    .HasColumnName("NanYueHashID");
            });

            modelBuilder.Entity<FrequencyPlaceArrive>(entity =>
            {
                entity.ToTable("Frequency_PlaceArrive", tb => tb.HasComment("班次线路，到达司机签到。"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Address)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("详细地址");
                entity.Property(e => e.ArriveTime)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("到达时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.BusNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("巴士车牌号码")
                    .HasColumnName("BusNO");
                entity.Property(e => e.Driver)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("司机姓名");
                entity.Property(e => e.DriverId)
                    .HasComment("司机ID，对应Driver.ID")
                    .HasColumnName("DriverID");
                entity.Property(e => e.DriverRemark)
                    .HasComment("司机备注")
                    .HasColumnType("text");
                entity.Property(e => e.FrequencyId)
                    .HasComment("班次ID  对应Frequency.ID")
                    .HasColumnName("FrequencyID");
                entity.Property(e => e.LeaveTime)
                    .HasComment("离开时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.PlaceName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("地点名称");
            });

            modelBuilder.Entity<HandOverList>(entity =>
            {
                entity.ToTable("HandOverList");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BoardingPassAmount)
                    .HasComment("登机牌金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.DiscountsAmount)
                    .HasComment("地空金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.FrontDeskAdult).HasComment("前台售票大人");
                entity.Property(e => e.FrontDeskChild).HasComment("前台小童");
                entity.Property(e => e.FrontDeskDiscounts).HasComment("前台地空");
                entity.Property(e => e.FrontDeskTicket)
                    .HasComment("前台车票额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.HandOver)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("班次名称 早 晚");
                entity.Property(e => e.HandOverEndDate)
                    .HasComment("班次结束时间 统计结束时间（班次结束时间）")
                    .HasColumnType("datetime");
                entity.Property(e => e.HandOverStartDate)
                    .HasComment("班次开始时间 统计开始时间（班次开始时间既 早班当日0：00）")
                    .HasColumnType("datetime");
                entity.Property(e => e.InsuranceAmount)
                    .HasComment("保险金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.InsuranceCashAmount)
                    .HasComment("保险现金")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.InsuranceCount).HasComment("保险人数");
                entity.Property(e => e.LuggageAmount)
                    .HasComment("行李金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.NotCheckAdult).HasComment("未检票 大人");
                entity.Property(e => e.NotCheckChild).HasComment("未检票小童");
                entity.Property(e => e.ServiceAmount)
                    .HasComment("手续费")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.ServiceCargeAmount)
                    .HasComment("服务费")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.TicketAmount)
                    .HasComment("车票金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.TicketAndInsuranceCashAmount)
                    .HasComment("车票+保险现金")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.TicketCashAmount)
                    .HasComment("车票现金")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.TwoCodeAmount)
                    .HasComment("二维码金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.WxAdult).HasComment("微信小程序大人数量");
                entity.Property(e => e.WxAmount)
                    .HasComment("微信小程序金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.WxChild).HasComment("微信小程序小童");
                entity.Property(e => e.WxDiscounts).HasComment("微信地空");
                entity.Property(e => e.WxOffline)
                    .HasComment("微信线下费")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Xjamount)
                    .HasComment("现金")
                    .HasColumnType("decimal(7, 2)")
                    .HasColumnName("XJAmount");
            });

            modelBuilder.Entity<HaveIntentionUserList>(entity =>
            {
                entity.ToTable("HaveIntentionUserList");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Author)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("提交客服");
                entity.Property(e => e.CheckDate)
                    .HasComment("回访时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Checker)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("回访人");
                entity.Property(e => e.CreateDate)
                    .HasComment("创建时间 客服提交时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("手机号");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.RecordId)
                    .HasComment(" 记录id 根据RecordType去表查找记录")
                    .HasColumnName("RecordID");
                entity.Property(e => e.RecordType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("回访类型 ：机票等");
                entity.Property(e => e.Remark).HasColumnType("text");
                entity.Property(e => e.UserId).HasColumnName("UserID");
                entity.Property(e => e.VisitLog).HasColumnType("text");
                entity.Property(e => e.VisitRemark)
                    .HasComment("回访备注")
                    .HasColumnType("text");
                entity.Property(e => e.VisitedState)
                    .HasDefaultValue(0)
                    .HasComment("回访状态：0未回访 1已回访 2已成交 3可根进");
            });

            modelBuilder.Entity<InterceptAirCompany>(entity =>
            {
                entity.ToTable("InterceptAirCompany", tb => tb.HasComment("拦截航空公司列表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AirCompanyName)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.AirLineCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.PolicyCode)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("特殊政策代码");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停止  1：正常（默认）");
            });

            modelBuilder.Entity<InvoiceLog>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK_InoviceLog");

                entity.ToTable("InvoiceLog");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("录入票号时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.EndNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("结束票号");
                entity.Property(e => e.LineModelId)
                    .HasComment("线路ID")
                    .HasColumnName("LineModelID");
                entity.Property(e => e.LineName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("线路名称");
                entity.Property(e => e.Operator)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("操作人");
                entity.Property(e => e.StartNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("开始发票号");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("记录状态  0：作废  1：正常（默认）");
            });

            modelBuilder.Entity<InvoiceRecord>(entity =>
            {
                entity.ToTable("InvoiceRecord");

                entity.HasIndex(e => e.InvoiceNum, "IX_InvoiceRecord");

                entity.HasIndex(e => new { e.LineModelId, e.PrintStatus, e.LogId }, "LineModelID");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("录入票号时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.FreNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("班次编号");
                entity.Property(e => e.InvoiceNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("发票号 ");
                entity.Property(e => e.IsInvoice).HasComment("是否开票（是否已提交税务局）");
                entity.Property(e => e.LineModelId)
                    .HasComment("发票类型 （对应线路模板ID）")
                    .HasColumnName("LineModelID");
                entity.Property(e => e.LineName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("线路名");
                entity.Property(e => e.LogId)
                    .HasComment("对应InvoiceLog.ID")
                    .HasColumnName("LogID");
                entity.Property(e => e.Operator)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("操作人");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("对应订单号");
                entity.Property(e => e.Price)
                    .HasComment("票面价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.PrintStatus).HasComment("打印状态 0未打印 1打印成功 2打印失败,已跳票  3作废");
                entity.Property(e => e.PrintTime)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("打印时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Printer)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("打印发票人");
                entity.Property(e => e.PsgIdcard)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("旅客证件号")
                    .HasColumnName("PsgIDCard");
                entity.Property(e => e.PsgMobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("旅客电话");
                entity.Property(e => e.PsgName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("旅客姓名");
                entity.Property(e => e.ReceiptNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("旅客票号");
                entity.Property(e => e.SetTime)
                    .HasComment("班车时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.TicketType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("票价类型");
            });

            modelBuilder.Entity<LinePlace>(entity =>
            {
                entity.ToTable("LinePlace", tb => tb.HasComment("线路地点"));

                entity.HasIndex(e => e.PlaceName, "PlaceName");

                entity.HasIndex(e => e.TypeId, "TypeID");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Address)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("具体位置");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("城市");
                entity.Property(e => e.CompanyId)
                    .HasDefaultValue(0)
                    .HasComment("商户ID  对应Company.ID")
                    .HasColumnName("CompanyID");
                entity.Property(e => e.District)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("镇区");
                entity.Property(e => e.IsGetOff)
                    .HasDefaultValue(true)
                    .HasComment("是否可下站  默认1可以  0：不可  1：可以");
                entity.Property(e => e.IsGetOn)
                    .HasDefaultValue(true)
                    .HasComment("是否可上站  默认1可以  0：不可  1：可以");
                entity.Property(e => e.IsGo)
                    .HasDefaultValue(true)
                    .HasComment("是否去程 默认1是  0:否");
                entity.Property(e => e.Latitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("纬度  竖轴  Y");
                entity.Property(e => e.Longitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("经度 横轴 X");
                entity.Property(e => e.NanYueStationId)
                    .HasComment("南粤通站点ID")
                    .HasColumnName("NanYueStationID");
                entity.Property(e => e.OneTicketService).HasComment("使用一票通  默认0不使用    1使用");
                entity.Property(e => e.PlaceName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("地点名称");
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("省份");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用  1：启用");
                entity.Property(e => e.TypeId)
                    .HasComment("对应BusLineType.ID")
                    .HasColumnName("TypeID");
                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("对应ButLineType.TypeName");
            });

            modelBuilder.Entity<MacLog>(entity =>
            {
                entity.ToTable("MacLog", tb => tb.HasComment("机器登陆日志"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Description)
                    .HasComment("描述")
                    .HasColumnType("text");
                entity.Property(e => e.IsSuccess)
                    .HasDefaultValue(true)
                    .HasComment("是否成功");
                entity.Property(e => e.LoginIp)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("机器所在IP");
                entity.Property(e => e.MacId)
                    .HasComment("机器ID")
                    .HasColumnName("MacID");
                entity.Property(e => e.OperateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("操作时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.OperateInfo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("操作");
            });

            modelBuilder.Entity<Machine>(entity =>
            {
                entity.ToTable("Machine", tb => tb.HasComment("机器表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AbleDate)
                    .HasComment("可用开始时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.InvalidDate)
                    .HasComment("停用时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.MacCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("机器码");
                entity.Property(e => e.MacId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("机器ID")
                    .HasColumnName("MacID");
                entity.Property(e => e.Password)
                    .HasMaxLength(10)
                    .IsUnicode(false)
                    .HasComment("终端密码  用于重置票号");
                entity.Property(e => e.Status)
                    .HasDefaultValue(1)
                    .HasComment("机器状态  0：停用  1：正常");
                entity.Property(e => e.Token)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("令牌");
            });

            modelBuilder.Entity<MemberFunction>(entity =>
            {
                entity.ToTable("MemberFunction", tb => tb.HasComment("会员功能函数"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Description)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("功能描述");
                entity.Property(e => e.Discount)
                    .HasComment("优惠额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.FunctionName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("功能名称");
                entity.Property(e => e.IsEveryoneEffect).HasComment("是否订单内每个人都生效，是的话全部生效，否的话只有会员一人生效。");
                entity.Property(e => e.IsRepeatEffect).HasComment("是否重复生效  默认0：否   1：是");
                entity.Property(e => e.MemberLimit).HasComment("生效人数   如2人同行减10，则此处为2.");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("该权益是否有效  默认1是，0否。");
                entity.Property(e => e.UseForMethods)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("适用于计算接口BuyTicket,PickupBuyTicket,UserRefund,CarOrder之类，往后继续增加。");
            });

            modelBuilder.Entity<MemberLevel>(entity =>
            {
                entity.ToTable("MemberLevel", tb => tb.HasComment("会员等级表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Description)
                    .HasMaxLength(350)
                    .IsUnicode(false)
                    .HasComment("会员功能介绍");
                entity.Property(e => e.Discount)
                    .HasComment("优惠额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.GivenDays).HasComment("赠送（天）");
                entity.Property(e => e.GivenMonths)
                    .HasDefaultValue(0)
                    .HasComment("赠送（月）");
                entity.Property(e => e.GivenYears).HasComment("赠送（年）");
                entity.Property(e => e.LevelName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("会员级别名称");
                entity.Property(e => e.Price)
                    .HasComment("成功会员价格")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("级别使用状态   默认1：正常  0：停用");
                entity.Property(e => e.UseDiscount).HasComment("是否开启优惠");
                entity.Property(e => e.UseGiven).HasComment("是否充值赠送时长");
                entity.Property(e => e.VipYears)
                    .HasDefaultValue(1)
                    .HasComment("充值一次成为会员的时长（年）");
            });

            modelBuilder.Entity<MemberLevelBindFunction>(entity =>
            {
                entity.ToTable("MemberLevel_BindFunction", tb => tb.HasComment("会员分级绑定权益列表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.FunctionId)
                    .HasComment("权益功能ID，对应MemberFunction.ID")
                    .HasColumnName("FunctionID");
                entity.Property(e => e.FunctionName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("权益规则名称，对应MemberFunction.FunctionName");
                entity.Property(e => e.IsEffect)
                    .HasDefaultValue(true)
                    .HasComment("是否有效，默认0：否   1：是");
                entity.Property(e => e.LevelId)
                    .HasComment("会员等级ID，对应MemberLevel.ID")
                    .HasColumnName("LevelID");
                entity.Property(e => e.LevelName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("会员级别名称，对应MemberLevel.LevelName");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("是否有效   默认1：正常  0：作废。");
            });

            modelBuilder.Entity<MenuFunction>(entity =>
            {
                entity.ToTable("MenuFunction", tb => tb.HasComment("后台菜单表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Ctler)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("开启功能");
                entity.Property(e => e.Expanded)
                    .HasDefaultValue(true)
                    .HasComment("是否展开");
                entity.Property(e => e.FatherId)
                    .HasComment("父节点ID")
                    .HasColumnName("FatherID");
                entity.Property(e => e.State)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用 1：正常（默认）");
                entity.Property(e => e.Title)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("功能标题");
                entity.Property(e => e.Type).HasComment("类型  0：系统  1：商户");
            });

            modelBuilder.Entity<MobileRecord>(entity =>
            {
                entity.ToTable("MobileRecord");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AgentNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("座席号（6668883001）");
                entity.Property(e => e.AnswerT)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("answer_t");
                entity.Property(e => e.CallType).HasComment("来电类型: 1.呼入  2.呼出 3.未接 4.已接 ");
                entity.Property(e => e.Checker)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("回访人");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.EndT)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("end_t");
                entity.Property(e => e.IsAnswer).HasComment("是否接通");
                entity.Property(e => e.IsFollowUp).HasComment("是否需要跟进");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("电话号码");
                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");
                entity.Property(e => e.StartT)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("start_t");
                entity.Property(e => e.Type)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValueSql("((0))")
                    .HasComment("类型  ：0其他 1机票搜索 2约车 3往年记录");
            });

            modelBuilder.Entity<ObeArlineCompany>(entity =>
            {
                entity.ToTable("OBE_ArlineCompany");

                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("id");
                entity.Property(e => e.ArilineName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ariline_name");
                entity.Property(e => e.Code)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("code");
                entity.Property(e => e.DeleteStatus)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("delete_status");
            });

            modelBuilder.Entity<ObeAviation>(entity =>
            {
                entity.ToTable("OBE_Aviation");

                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("id");
                entity.Property(e => e.AirportCode)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasColumnName("airport_code");
                entity.Property(e => e.AirportName)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasColumnName("airport_name");
                entity.Property(e => e.CityId).HasColumnName("city_Id");
                entity.Property(e => e.DeleteStatus)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasColumnName("delete_status");
            });

            modelBuilder.Entity<ObeCity>(entity =>
            {
                entity.ToTable("OBE_City");

                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("id");
                entity.Property(e => e.CityName)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasColumnName("city_name");
                entity.Property(e => e.Code)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasColumnName("code");
                entity.Property(e => e.DeleteStatus)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasColumnName("delete_status");
                entity.Property(e => e.PinYin)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasColumnName("pin_yin");
                entity.Property(e => e.Spell)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasColumnName("spell");
            });

            modelBuilder.Entity<OrderList>(entity =>
            {
                entity.ToTable("OrderList", tb => tb.HasComment("订单表"));

                entity.HasIndex(e => new { e.OrderNum, e.CreateDate, e.GetOn, e.GetOff, e.OrderType, e.SetDate, e.OrderState, e.Status }, "IX_OrderList");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Adult).HasComment("成人人数");
                entity.Property(e => e.AppointAddress)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("预约地址");
                entity.Property(e => e.AppointTime)
                    .HasComment("预约时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Baby).HasComment("婴儿人数");
                entity.Property(e => e.BusinessId)
                    .HasDefaultValue(1)
                    .HasComment("所属商户ID。对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CarNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("接送车牌")
                    .HasColumnName("CarNO");
                entity.Property(e => e.CheckRemarks)
                    .HasComment("计调备注")
                    .HasColumnType("text");
                entity.Property(e => e.CheckTime)
                    .HasComment("订单完成时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Child).HasComment("小孩人数");
                entity.Property(e => e.Comment)
                    .HasComment("订单评价")
                    .HasColumnType("text");
                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人姓名");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.DeviceAddress)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("设置下单时获取的地址");
                entity.Property(e => e.DeviceLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("设备下单时获取的经纬度");
                entity.Property(e => e.DriverMobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机电话");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("接送司机姓名");
                entity.Property(e => e.FlightNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("航班号");
                entity.Property(e => e.FlightOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("对应机票订单号");
                entity.Property(e => e.FromSalesId)
                    .HasComment("SysAccount.ID")
                    .HasColumnName("FromSalesID");
                entity.Property(e => e.FromTermin)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("下单终端  微信网页、一体机、小程序");
                entity.Property(e => e.GetOff)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("目的地");
                entity.Property(e => e.GetOffTime)
                    .HasComment("预计到达时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.GetOn)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("上车地点");
                entity.Property(e => e.GetOnTime)
                    .HasComment("预计上车时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.GoOutPurpose)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("出行目的   差旅、旅游");
                entity.Property(e => e.InsuranceCompany)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("保险公司");
                entity.Property(e => e.InsuranceProduct)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("保险产品名称");
                entity.Property(e => e.InsuranceSinglePrice)
                    .HasComment("保险产品单价")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.InsuranceTotalPrice)
                    .HasComment("购买保险产品总价")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.IsFreeOrder).HasComment("是否机票赠送免费车票 默认0：否  1：是");
                entity.Property(e => e.IsGo)
                    .HasDefaultValue(true)
                    .HasComment("是否去程  1：是  0：返");
                entity.Property(e => e.IsNanYueSync).HasComment("是否已同步到南粤通");
                entity.Property(e => e.LuggageCount).HasComment("行李件数");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人电话");
                entity.Property(e => e.NanYueOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("南粤通订单号");
                entity.Property(e => e.NeedInsurance).HasComment("是否购买保险");
                entity.Property(e => e.OrderCheck)
                    .HasDefaultValue(true)
                    .HasComment("订单确认  默认1：确认  若OrderType=2预订车时，则需为0未确认，待操作人员人工确认。");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("订单唯一编号  yyyymmdd+FreID+thisFreNum+TodayOrderNum");
                entity.Property(e => e.OrderState).HasComment("订单状态  0：生成保存状态，待支付  1：已支付并成功减位  2：已验票上车   3：发起退票   4：退票成功  5：预约确认中");
                entity.Property(e => e.OrderType).HasComment("订单类型  0：终端机下单   1：小程序正常订单   2：小程序去程接送单  3：小程序回程接送单  4：小程序回程接送预约");
                entity.Property(e => e.OrderWay).HasComment("单据来源  0：本系统   1：南粤通同步到本地");
                entity.Property(e => e.OverLuggagePrice)
                    .HasComment("超出行李费")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.PickupCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("接送城市");
                entity.Property(e => e.PickupDistrict)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("接送镇区");
                entity.Property(e => e.PickupPrice)
                    .HasComment("接送费")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.PickupProvince)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("接送省份");
                entity.Property(e => e.Remarks)
                    .HasComment("备订单注")
                    .HasColumnType("text");
                entity.Property(e => e.ServicePoint)
                    .HasDefaultValue(10)
                    .HasComment("服务评分");
                entity.Property(e => e.SetDate)
                    .HasComment("出发日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.StationServicePrice)
                    .HasComment("总站场服务费收费")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Status).HasComment("订单状态  默认1正常  0：作废  1：正常");
                entity.Property(e => e.TargetAddress)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("旅客目的地");
                entity.Property(e => e.TotalPrice)
                    .HasComment("总价")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.TotalSit).HasComment("占位数");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID，对应UserData.ID，终端默认为0.")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<OrderListCheckDatum>(entity =>
            {
                entity.ToTable("OrderList_CheckData", tb => tb.HasComment("包车订单数据确认"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.DesArriveLatitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("到达目的地 纬度  竖轴  Y");
                entity.Property(e => e.DesArriveLongitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("到达目的地 经度 横轴 X");
                entity.Property(e => e.DesArriveTime)
                    .HasComment("到达时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.DriverArriveLatitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机确认地点 纬度  竖轴  Y");
                entity.Property(e => e.DriverArriveLongitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机确认地点 经度 横轴 X");
                entity.Property(e => e.DriverArriveTime)
                    .HasComment("司机到达指定地点时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.OrderId)
                    .HasComment("订单ID，对应OrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.PickupTime)
                    .HasComment("起程时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.UserArriveLatitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("客户确认地点纬度  竖轴  Y");
                entity.Property(e => e.UserArriveLongitude)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("客户确认地点经度 横轴 X");
                entity.Property(e => e.UserArriveTime)
                    .HasComment("客户到达指定地点时间")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<OrderListInfo>(entity =>
            {
                entity.ToTable("OrderList_Info", tb => tb.HasComment("订单明细"));

                entity.HasIndex(e => new { e.OrderId, e.ContactId, e.Status, e.IsInsurance }, "IX_OrderList_Info");

                entity.HasIndex(e => new { e.ReceiptNum, e.AgeType, e.TicketType }, "PriKey");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AgeType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("年龄段  大人，儿童，婴儿。");
                entity.Property(e => e.CardNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件号码")
                    .HasColumnName("CardNO");
                entity.Property(e => e.ContactId).HasColumnName("ContactID");
                entity.Property(e => e.InsuranceNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("保单号")
                    .HasColumnName("InsuranceNO");
                entity.Property(e => e.InsurancePrice)
                    .HasComment("保险单价")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.IsInsurance).HasComment("是否有购买保险");
                entity.Property(e => e.KongGangOrderNum)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("空港巨点接口订单号");
                entity.Property(e => e.KongGangPriceCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("空港价格编号");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系电话");
                entity.Property(e => e.NanYueOrderNum)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("南粤通订单号");
                entity.Property(e => e.NanYueTicketId)
                    .HasComment("南粤通票号ID")
                    .HasColumnName("NanYueTicketID");
                entity.Property(e => e.OrderId)
                    .HasComment("对应OrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.PapersType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件类型  身份证、军人证、学生证、港澳通行证、护照、残疾人证、其它");
                entity.Property(e => e.PickupPrice)
                    .HasComment("接送价格")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Price)
                    .HasComment("价格")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.PrintCount).HasComment("打印次数");
                entity.Property(e => e.PrintInfo)
                    .HasComment("打印内容")
                    .HasColumnType("text");
                entity.Property(e => e.PrintState).HasComment("打印状态   0：未打印   1：已打印    2：打印出错");
                entity.Property(e => e.PrintTime)
                    .HasComment("打印时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.RealName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.ReceiptNum)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("票号");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态 默认1正常 0：作废  1：正常");
                entity.Property(e => e.TicketType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("票类型  全票、半票、免票，学生票，残疾军人票。");
                entity.Property(e => e.TotalPrice)
                    .HasComment("个人总价")
                    .HasColumnType("decimal(7, 2)");
            });

            modelBuilder.Entity<OrderListInfoFrequency>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK_OrderList_Receipt");

                entity.ToTable("OrderList_InfoFrequency", tb => tb.HasComment("订单客户对应班次"));

                entity.HasIndex(e => new { e.InfoId, e.FrequencyId, e.Status, e.OrderId, e.EditableTime, e.FromPlace, e.ToPlace, e.ChangeTimes }, "IX_OrderList_InfoFrequency");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ChangeTimes).HasComment("变更班次次数  默认0，最多1");
                entity.Property(e => e.CheckTime).HasColumnType("datetime");
                entity.Property(e => e.Checked).HasComment("是否已验票");
                entity.Property(e => e.Checker)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("验票人");
                entity.Property(e => e.CheckerId)
                    .HasComment("验票人ID")
                    .HasColumnName("CheckerID");
                entity.Property(e => e.ContactId)
                    .HasComment("乘客ID  对应UserData.Contact.ID")
                    .HasColumnName("ContactID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.EditableTime)
                    .HasComment("可变更班次的时间止")
                    .HasColumnType("datetime");
                entity.Property(e => e.FreNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("班次号");
                entity.Property(e => e.FrequencyId)
                    .HasComment("对应Frequency.ID")
                    .HasColumnName("FrequencyID");
                entity.Property(e => e.FromPlace)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("始发地");
                entity.Property(e => e.GetOffTime)
                    .HasComment("预计到达时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.GetOnTime)
                    .HasComment("预计上车时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.InfoId)
                    .HasComment("对应OrderList_Info.ID")
                    .HasColumnName("InfoID");
                entity.Property(e => e.LineName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("班次线路名");
                entity.Property(e => e.OrderId)
                    .HasComment("对应OrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.Price)
                    .HasComment("单程金额")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.Seat)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.SetTime)
                    .HasComment("班车发班时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常  0：作废  1：正常");
                entity.Property(e => e.ToPlace)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("目的地");
            });

            modelBuilder.Entity<OrderListPlan>(entity =>
            {
                entity.ToTable("OrderList_Plan");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Distance).HasComment("距离(米)");
                entity.Property(e => e.DriverMinute).HasComment("预计行车时长");
                entity.Property(e => e.FlightTime)
                    .HasComment("航班起飞时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.FrequencyId)
                    .HasComment("计划使用的班次ID")
                    .HasColumnName("Frequency_ID");
                entity.Property(e => e.FromStation)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("上车站点");
                entity.Property(e => e.IsEligible)
                    .HasDefaultValue(true)
                    .HasComment("是否符合条件");
                entity.Property(e => e.Kilo).HasComment("公里数");
                entity.Property(e => e.LeadTime)
                    .HasComment("提前时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.OrderId)
                    .HasComment("OrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.PickupAddress)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("接送地址");
                entity.Property(e => e.PlanPickupTime)
                    .HasComment("计划接送时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Reason)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("不符合条件时的原因");
                entity.Property(e => e.SetTime)
                    .HasComment("班车发车时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.ToStation)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("目的站点");
                entity.Property(e => e.UsePlan).HasComment("使用计划  默认0不使用");
            });

            modelBuilder.Entity<OrderListRebateInfo>(entity =>
            {
                entity.ToTable("OrderList_RebateInfo");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Amount)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("返佣金额");
                entity.Property(e => e.IsSettle).HasComment("是否结清");
                entity.Property(e => e.OrderId)
                    .HasComment("订单编号")
                    .HasColumnName("OrderID");
                entity.Property(e => e.RebateConfigId).HasComment("符合返佣配置id");
                entity.Property(e => e.RebateProportion)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<OrderListServiceList>(entity =>
            {
                entity.ToTable("OrderList_ServiceList", tb => tb.HasComment("订单购买服务明细"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.InfoId)
                    .HasComment("对应OrderList_Info.ID,整张订单生效则为0")
                    .HasColumnName("InfoID");
                entity.Property(e => e.OrderId)
                    .HasComment("对应OrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.Price)
                    .HasComment("价格")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.ServiceId)
                    .HasComment("对应ExtraService.ID")
                    .HasColumnName("ServiceID");
                entity.Property(e => e.ServiceName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("服务名 对应ExtraService.ServiceName");
                entity.Property(e => e.SetDate)
                    .HasComment("使用日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常  0作废");
                entity.Property(e => e.Used)
                    .HasDefaultValue(true)
                    .HasComment("是否已生效 默认1是，否0.生效则不作退款。");
                entity.Property(e => e.UsedTime)
                    .HasComment("后台确认时间")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<OrderListThirdChannel>(entity =>
            {
                entity.ToTable("OrderList_ThirdChannel", tb => tb.HasComment("第三方订单信息"));

                entity.HasIndex(e => new { e.MainOrderId, e.MainOrderNum, e.ThirdOrderNum, e.ThirdChannelName }, "Order");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Commission)
                    .HasComment("手续费")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.MainOrderId)
                    .HasComment("主订单ID，对应OrderList.ID")
                    .HasColumnName("MainOrderID");
                entity.Property(e => e.MainOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("主订单号，对应OrderList.OrderNum");
                entity.Property(e => e.OperFunction)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValue("Create")
                    .HasComment("操作类型");
                entity.Property(e => e.OrderData)
                    .HasComment("第三方Data数据")
                    .HasColumnType("text");
                entity.Property(e => e.PayTime)
                    .HasComment("支付时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Refund)
                    .HasComment("退款额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.RefundTime)
                    .HasComment("退款时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Settlement)
                    .HasComment("结算价")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.ThirdChannelName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("第三方渠道名称");
                entity.Property(e => e.ThirdOrderNum)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("第三方订单ID");
                entity.Property(e => e.ThirdWayState).HasComment("第三方记录状态  0：停用  1：正常  2：完成   3：异常  4：退款");
                entity.Property(e => e.TotalPrice)
                    .HasComment("总价")
                    .HasColumnType("decimal(7, 2)");
            });

            modelBuilder.Entity<PayRequest>(entity =>
            {
                entity.ToTable(tb => tb.HasComment("支付请求"));

                entity.HasIndex(e => e.CreateTime, "CreateTime");

                entity.HasIndex(e => new { e.OrderId, e.OrderNum }, "Order");

                entity.HasIndex(e => e.Status, "Status");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasDefaultValue(1)
                    .HasComment("企业ID   1：候机楼  2：运通")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CreateTime)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.EngName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValue("wechatPay")
                    .HasComment("支付商英文");
                entity.Property(e => e.OnlinePay)
                    .HasDefaultValue(true)
                    .HasComment("是否在线支付   0：否  1：是（默认）");
                entity.Property(e => e.OrderId)
                    .HasComment("订单ID  对应OrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("订单号 对应OrderList.OrderNum");
                entity.Property(e => e.PayAmt)
                    .HasComment("用户实际支付金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.PayInfo)
                    .HasComment("支付渠道信息")
                    .HasColumnType("text");
                entity.Property(e => e.PayMoney)
                    .HasComment("支付金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.PayNumbers)
                    .HasMaxLength(120)
                    .IsUnicode(false)
                    .HasComment("交易流水号");
                entity.Property(e => e.PayStyle)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("支付方式   微信支付、支付宝");
                entity.Property(e => e.PayTime)
                    .HasComment("完成支付时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.ProviderName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValue("微信支付")
                    .HasComment("支付提供商");
                entity.Property(e => e.RefundInfo)
                    .HasComment("退款信息")
                    .HasColumnType("text");
                entity.Property(e => e.RefundMoney)
                    .HasComment("退款额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.RefundTime)
                    .HasComment("退款时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Remarks)
                    .HasComment("操作备注")
                    .HasColumnType("text");
                entity.Property(e => e.Status)
                    .HasDefaultValue(1)
                    .HasComment("状态 默认1：正常未支付   0：作废   1：正常未支付   2：已支付成功  3:已源路退回");
            });

            modelBuilder.Entity<PayRequestsDetail>(entity =>
            {
                entity.ToTable("PayRequests_Detail");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("操作时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.DetailNum)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Money)
                    .HasComment("金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Operator)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("操作员");
                entity.Property(e => e.PayId).HasComment("支付单号 PayRequests.id");
                entity.Property(e => e.Remarks)
                    .HasComment("备注")
                    .HasColumnType("text");
                entity.Property(e => e.Type)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<PaymentList>(entity =>
            {
                entity.ToTable("PaymentList", tb => tb.HasComment("支付商户"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Description)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("描述");
                entity.Property(e => e.EngName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("英文名");
                entity.Property(e => e.Icon)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("图标");
                entity.Property(e => e.Image)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("图片");
                entity.Property(e => e.ProviderName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("支付商");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用  1：正常");
            });

            modelBuilder.Entity<PickupAreaPrice>(entity =>
            {
                entity.ToTable("PickupAreaPrice", tb => tb.HasComment("接送服务区域定价"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("城市");
                entity.Property(e => e.District)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("镇区");
                entity.Property(e => e.ForModel).HasComment("对应线路模板");
                entity.Property(e => e.Otprice)
                    .HasComment("特殊时间点加收服务费")
                    .HasColumnType("decimal(6, 2)")
                    .HasColumnName("OTPrice");
                entity.Property(e => e.Price)
                    .HasComment("一般价格")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("省份");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1：启用  2：停用");
                entity.Property(e => e.VipPrice)
                    .HasComment("VIP价格")
                    .HasColumnType("decimal(6, 2)");
            });

            modelBuilder.Entity<PickupOrderGroup>(entity =>
            {
                entity.ToTable(tb => tb.HasComment("接送订单排车表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CarNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("接送车牌")
                    .HasColumnName("CarNO");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.DriverId).HasColumnName("DriverID");
                entity.Property(e => e.DriverMobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机电话");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("司机姓名");
                entity.Property(e => e.EditMsg)
                    .HasComment("修改记录")
                    .HasColumnType("text");
                entity.Property(e => e.EndJobTime)
                    .HasComment("执行结束时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.FromTo)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("行程走法   懿峰候机楼-客户地址A-客户地址B-懿峰候机楼");
                entity.Property(e => e.GroupName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("组别名称  例：A  B");
                entity.Property(e => e.IsFinish)
                    .HasDefaultValue(false)
                    .HasComment("是否已完成");
                entity.Property(e => e.IsOverTime).HasComment("是否超时加班");
                entity.Property(e => e.JobState).HasComment("工作进度  0：未开始  1：进行中  2：已完成  3：中断  4：打回");
                entity.Property(e => e.PickupDate)
                    .HasComment("接送日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.PickupType).HasComment("接送类型   2：去程接送   3：回程接送   4：回程预约");
                entity.Property(e => e.StartJobTime)
                    .HasComment("开始执行时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("记录状态  默认1：正常 0：作废");
                entity.Property(e => e.SysUserId)
                    .HasComment("系统操作员ID，对应SysAccount.ID")
                    .HasColumnName("SysUserID");
                entity.Property(e => e.SysUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("系统操作员姓名  对应SysAccount.RealName");
                entity.Property(e => e.TotalMileage).HasComment("总里程公里数");
            });

            modelBuilder.Entity<PickupOrderGroupsOrderDetail>(entity =>
            {
                entity.ToTable("PickupOrderGroups_OrderDetail", tb => tb.HasComment("接送单组订单序列"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.EditMsg)
                    .HasComment("修改信息")
                    .HasColumnType("text");
                entity.Property(e => e.EndAddr)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("结束地址");
                entity.Property(e => e.EstimateEndTime)
                    .HasComment("预估结束时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.EstimateSpendTime).HasComment("花费时间（分钟）");
                entity.Property(e => e.EstimateStartTime)
                    .HasComment("预估开始时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.EstimateTotalMileage).HasComment("里程数");
                entity.Property(e => e.FromAddress)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("始发地点");
                entity.Property(e => e.GroupId)
                    .HasComment("组别ID，对应PickupOrderGroups.ID")
                    .HasColumnName("GroupID");
                entity.Property(e => e.GuestComment)
                    .HasComment("客户评语")
                    .HasColumnType("text");
                entity.Property(e => e.GuestMark)
                    .HasDefaultValue(5)
                    .HasComment("客户评分");
                entity.Property(e => e.InFactEndTime)
                    .HasComment("实际完成时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.InFactSpendTime).HasComment("实际使用时间");
                entity.Property(e => e.InFactStartTime)
                    .HasComment("实际开始时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.InfactTotalMileage).HasComment("实际公里数");
                entity.Property(e => e.OrderId)
                    .HasComment("订单ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.PickupDate)
                    .HasComment("接送时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.StartAddr)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("起始地址");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常  0作废");
                entity.Property(e => e.ToAddress)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("到达地点");
                entity.Property(e => e.WorkState).HasComment("作业进度   0：未开始   1：进行中  2：已完成   3：客户超时   4：回派");
            });

            modelBuilder.Entity<PickupPriceAdjust>(entity =>
            {
                entity.ToTable("PickupPriceAdjust", tb => tb.HasComment("接送价格时间段调整"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AdjustName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("调整名称 例：6点前加价10元");
                entity.Property(e => e.EndDate)
                    .HasComment("结束日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.EndTime)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("结束时间");
                entity.Property(e => e.Price)
                    .HasComment("价格变动，可正可负。")
                    .HasColumnType("decimal(4, 2)");
                entity.Property(e => e.StartDate)
                    .HasComment("生效日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.StartTime)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("生效时间");
                entity.Property(e => e.State)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常  0停用");
            });

            modelBuilder.Entity<PictureList>(entity =>
            {
                entity.ToTable("PictureList", tb => tb.HasComment("图片记录表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Description)
                    .HasComment("图片描述")
                    .HasColumnType("text");
                entity.Property(e => e.LocalPath)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("本地保存路径");
                entity.Property(e => e.PicName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("原文件名");
                entity.Property(e => e.PicType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("图片类型 jpg,png,gif等");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：作废  1：正常（默认）");
                entity.Property(e => e.StorageName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("本地保存文件名");
                entity.Property(e => e.TypeId)
                    .HasComment("类型ID，对应PictureType.ID")
                    .HasColumnName("TypeID");
                entity.Property(e => e.UploadUserId)
                    .HasComment("上传者ID，对应SysAccount.ID")
                    .HasColumnName("UploadUserID");
            });

            modelBuilder.Entity<PictureType>(entity =>
            {
                entity.ToTable("PictureType", tb => tb.HasComment("图片类型"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.DocumentName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("本地文件夹名称");
                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("图片类型名称");
            });

            modelBuilder.Entity<PutCardInfo>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToTable("PutCardInfo");

                entity.Property(e => e.CardId)
                    .HasComment("卡券批次号")
                    .HasColumnName("CardID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.Id)
                    .ValueGeneratedOnAdd()
                    .HasColumnName("ID");
                entity.Property(e => e.PutInfo).HasColumnType("text");
                entity.Property(e => e.PutOpenid)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<RebateConfig>(entity =>
            {
                entity.ToTable("RebateConfig");

                entity.Property(e => e.Id).HasColumnName("id");
                entity.Property(e => e.ModelId)
                    .HasComment("线路id OrderType>=3  生效")
                    .HasColumnName("ModelID");
                entity.Property(e => e.OrderType).HasComment("订单类型1：生客  2：熟客 3：地空");
                entity.Property(e => e.Proportion)
                    .HasComment("返佣比例 百分比1%=0.01")
                    .HasColumnType("decimal(8, 2)");
            });

            modelBuilder.Entity<ReceiptAssign>(entity =>
            {
                entity.ToTable("ReceiptAssign", tb => tb.HasComment("发票分配"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.MacId).HasColumnName("MacID");
                entity.Property(e => e.Pcid)
                    .HasComment("PC端ID")
                    .HasColumnName("PCID");
                entity.Property(e => e.ReceiptEnd)
                    .HasMaxLength(15)
                    .IsUnicode(false);
                entity.Property(e => e.ReceiptStart)
                    .HasMaxLength(15)
                    .IsUnicode(false);
                entity.Property(e => e.State).HasComment("状态  0：作废    1：使用中    2：已用完");
                entity.Property(e => e.TerminType).HasComment("终端类型   0：终端机  1：售票电脑");
            });

            modelBuilder.Entity<Role>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK__Role__3214EC272E1BDC42");

                entity.ToTable("Role", tb => tb.HasComment("角色表"));

                entity.Property(e => e.Id)
                    .HasDefaultValueSql("('1')")
                    .HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.RoleCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.RoleName)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("角色名称");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态：1 正常  0 作废");
                entity.Property(e => e.UpdateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("修改时间")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<SCity>(entity =>
            {
                entity.HasKey(e => e.CityId);

                entity.ToTable("S_City");

                entity.Property(e => e.CityId).HasColumnName("CityID");
                entity.Property(e => e.CityName).HasMaxLength(50);
                entity.Property(e => e.DateCreated).HasColumnType("datetime");
                entity.Property(e => e.DateUpdated).HasColumnType("datetime");
                entity.Property(e => e.ProvinceId).HasColumnName("ProvinceID");
                entity.Property(e => e.ZipCode).HasMaxLength(50);

                entity.HasOne(d => d.Province).WithMany(p => p.SCities)
                    .HasForeignKey(d => d.ProvinceId)
                    .HasConstraintName("FK_S_City_S_Province");
            });

            modelBuilder.Entity<SDistrict>(entity =>
            {
                entity.HasKey(e => e.DistrictId);

                entity.ToTable("S_District");

                entity.Property(e => e.DistrictId).HasColumnName("DistrictID");
                entity.Property(e => e.CityId).HasColumnName("CityID");
                entity.Property(e => e.DateCreated).HasColumnType("datetime");
                entity.Property(e => e.DateUpdated).HasColumnType("datetime");
                entity.Property(e => e.DistrictName).HasMaxLength(50);

                entity.HasOne(d => d.City).WithMany(p => p.SDistricts)
                    .HasForeignKey(d => d.CityId)
                    .HasConstraintName("FK_S_District_S_City");
            });

            modelBuilder.Entity<SProvince>(entity =>
            {
                entity.HasKey(e => e.ProvinceId);

                entity.ToTable("S_Province");

                entity.Property(e => e.ProvinceId).HasColumnName("ProvinceID");
                entity.Property(e => e.DateCreated).HasColumnType("datetime");
                entity.Property(e => e.DateUpdated).HasColumnType("datetime");
                entity.Property(e => e.ProvinceName).HasMaxLength(50);
            });

            modelBuilder.Entity<SalesBindGuest>(entity =>
            {
                entity.ToTable("SalesBindGuest", tb => tb.HasComment("销售绑定客户表"));

                entity.HasIndex(e => e.WxOpenId, "IX_SalesBindGuest").IsUnique();

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.FromParams)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("销售来源");
                entity.Property(e => e.IsSure).HasComment("是否已确定绑定");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态");
                entity.Property(e => e.WxOpenId)
                    .HasMaxLength(90)
                    .IsUnicode(false)
                    .HasComment("客户OPENID")
                    .HasColumnName("WxOpenID");
            });

            modelBuilder.Entity<SalesmanList>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToTable("SalesmanList");

                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.GoOutPurpose)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("出行目的");
                entity.Property(e => e.Id)
                    .ValueGeneratedOnAdd()
                    .HasColumnName("ID");
                entity.Property(e => e.OrderId).HasComment("订单ID");
                entity.Property(e => e.Salesman)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("推销人");
                entity.Property(e => e.UserId).HasComment("客户ID");
            });

            modelBuilder.Entity<ScopeClassifyGood>(entity =>
            {
                entity.ToTable("ScopeClassify_Goods", tb => tb.HasComment("业务分类细项商品"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AdultPrice)
                    .HasComment("成人价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.BabyPrice)
                    .HasComment("婴儿价格")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.ChildPrice)
                    .HasComment("儿童价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.ClassifyId)
                    .HasComment("分类ID")
                    .HasColumnName("ClassifyID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.Description)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("商品描述");
                entity.Property(e => e.EarlierDay)
                    .HasDefaultValue(1)
                    .HasComment("需提早预订的天数");
                entity.Property(e => e.EndDate)
                    .HasComment("结束日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.GoodsLogoUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("商品首图片");
                entity.Property(e => e.IsAdvert).HasComment("是否显示为广告");
                entity.Property(e => e.IsPickup).HasComment("是否默认接送  0：否（默认）  1：是");
                entity.Property(e => e.MaxMember).HasComment("最大人数");
                entity.Property(e => e.ModelId)
                    .HasComment("模板ID，对应ScopeGoodsModel.ID")
                    .HasColumnName("ModelID");
                entity.Property(e => e.Remarks)
                    .HasComment("备注")
                    .HasColumnType("text");
                entity.Property(e => e.ScopeContent)
                    .HasComment("商品网页介绍内容")
                    .HasColumnType("text");
                entity.Property(e => e.ScopeName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("业务名称");
                entity.Property(e => e.StartDate)
                    .HasComment("开始日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用  1：正常（默认）");
                entity.Property(e => e.TimeType).HasComment("时间类型  0：时间段内均可购买   1：时间段内为购买期，EndDate为服务供给日期，如旅游。");
                entity.Property(e => e.VipDiscount)
                    .HasComment("VIP优惠减免额")
                    .HasColumnType("decimal(8, 2)");
            });

            modelBuilder.Entity<ScopeExtraService>(entity =>
            {
                entity.ToTable("ScopeExtraService", tb => tb.HasComment("业务额外服务列表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.DefaultUsed)
                    .HasDefaultValue(true)
                    .HasComment("默认下单后生效，不作退款。  0：否  1：是");
                entity.Property(e => e.Description)
                    .HasComment("描述")
                    .HasColumnType("text");
                entity.Property(e => e.EndDate)
                    .HasComment("结束时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.GroupName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("组名  同组里只可以单选并以并列列表显示，没组名则单独显示。");
                entity.Property(e => e.IconUrl)
                    .HasMaxLength(70)
                    .IsUnicode(false)
                    .HasComment("图标路径");
                entity.Property(e => e.ImageUrl)
                    .HasMaxLength(70)
                    .IsUnicode(false)
                    .HasComment("图片路径");
                entity.Property(e => e.IsSingle)
                    .HasDefaultValue(true)
                    .HasComment("是否对个人");
                entity.Property(e => e.LimitCount).HasComment("数量限量");
                entity.Property(e => e.LimitType).HasComment("限量形式  0：按天  1：按月  2：按年");
                entity.Property(e => e.ModelId)
                    .HasComment("模板ID，对应ScopeGoodsModel.ID")
                    .HasColumnName("ModelID");
                entity.Property(e => e.Price)
                    .HasComment("价格")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.ServiceName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("服务名称");
                entity.Property(e => e.StartDate)
                    .HasComment("开始时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  1：正常（默认）  0：停用");
                entity.Property(e => e.VipPrice)
                    .HasComment("VIP价格")
                    .HasColumnType("decimal(6, 2)");
            });

            modelBuilder.Entity<ScopeGoodsModel>(entity =>
            {
                entity.ToTable("ScopeGoodsModel", tb => tb.HasComment("业务分类商品模板"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AdultPrice)
                    .HasComment("成人价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.BabyPrice)
                    .HasComment("婴儿价格")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.ChildPrice)
                    .HasComment("儿童价")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.ClassifyId)
                    .HasComment("分类ID")
                    .HasColumnName("ClassifyID");
                entity.Property(e => e.Description)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("商品描述");
                entity.Property(e => e.EarlierDay)
                    .HasDefaultValue(1)
                    .HasComment("需提早预订的天数");
                entity.Property(e => e.GoodsLogoUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("商品首图片");
                entity.Property(e => e.IsPickup).HasComment("是否默认接送  0：否（默认）  1：是");
                entity.Property(e => e.MaxMember).HasComment("最大人数");
                entity.Property(e => e.Remarks)
                    .HasComment("备注")
                    .HasColumnType("text");
                entity.Property(e => e.ScopeContent)
                    .HasComment("商品网页介绍内容")
                    .HasColumnType("text");
                entity.Property(e => e.ScopeName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("业务名称");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用  1：正常（默认）");
                entity.Property(e => e.TimeType).HasComment("时间类型  0：时间段内均可购买   1：时间段内为购买期，EndDate为服务供给日期，如旅游。");
                entity.Property(e => e.TypeId)
                    .HasComment("业务大类ID  ，对应ScopeType.ID")
                    .HasColumnName("TypeID");
            });

            modelBuilder.Entity<ScopeOrderList>(entity =>
            {
                entity.ToTable("ScopeOrderList", tb => tb.HasComment("业务订单"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Address)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("地址   租车或旅游用");
                entity.Property(e => e.Adult).HasComment("成人人数");
                entity.Property(e => e.Baby).HasComment("婴儿人数");
                entity.Property(e => e.BusinessId)
                    .HasDefaultValue(1)
                    .HasComment("所属商户ID。对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CheckTime)
                    .HasComment("订单完成时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Child).HasComment("小孩人数");
                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人姓名");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("订单创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.LuggageCount).HasComment("行李件数");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人电话");
                entity.Property(e => e.OperatorRemarks)
                    .HasComment("计调操作员备注")
                    .HasColumnType("text");
                entity.Property(e => e.OrderCheck)
                    .HasDefaultValue(true)
                    .HasComment("订单确认  默认1：确认  若OrderType=2预订车时，则需为0未确认，待操作人员人工确认。");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("业务订单编号S+yyyyMMddHHmm+TodayCount");
                entity.Property(e => e.OrderRemarks)
                    .HasComment("客户订单备注")
                    .HasColumnType("text");
                entity.Property(e => e.OrderState).HasComment("订单状态  0：生成保存状态，待支付  1：已支付  2：已完成   3：发起退款   4：退票成功");
                entity.Property(e => e.OrderType)
                    .HasDefaultValue(1)
                    .HasComment("订单类型   1：正常订单   1：需接送订单");
                entity.Property(e => e.SetDate)
                    .HasComment("出发日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("订单状态  默认1正常  0：作废  1：正常");
                entity.Property(e => e.TotalPrice)
                    .HasComment("总价")
                    .HasColumnType("decimal(9, 2)");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID，对应UserData.ID，终端默认为0.")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<ScopeOrderListGoodsList>(entity =>
            {
                entity.ToTable("ScopeOrderList_GoodsList", tb => tb.HasComment("业务、商品订单商品列表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应ScopeClassify_Goods.BusinessID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.Count).HasComment("购买数量");
                entity.Property(e => e.Discount)
                    .HasComment("优惠")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.ExtraPrice)
                    .HasComment("额外收费")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.OrderId)
                    .HasComment("订单ID，对应ScopeOrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.PointBounds).HasComment("使用积分数");
                entity.Property(e => e.PointDiscount)
                    .HasComment("积分优惠额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Price)
                    .HasComment("单价")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Remarks)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("备注");
                entity.Property(e => e.ScopeGoodsId)
                    .HasComment("业务商品ID，对应ScopeClassify_Goods.ID")
                    .HasColumnName("ScopeGoodsID");
                entity.Property(e => e.ScopeGoodsName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("业务名称，对应ScopeClassify_Goods.ScopeName");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态   默认1：正常   0：作废");
                entity.Property(e => e.TotalPrice)
                    .HasComment("总金额  TotalPrice=(Price*Count)-Discount-PointDiscount+ExtraPrice")
                    .HasColumnType("decimal(7, 2)");
            });

            modelBuilder.Entity<ScopeOrderListInfo>(entity =>
            {
                entity.ToTable("ScopeOrderList_Info", tb => tb.HasComment("业务订单明细"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AgeType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("年龄段  大人，儿童，婴儿。");
                entity.Property(e => e.CardNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件号码")
                    .HasColumnName("CardNO");
                entity.Property(e => e.ContactId)
                    .HasComment("对应UserData_Contact.ID")
                    .HasColumnName("ContactID");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系电话");
                entity.Property(e => e.OrderId)
                    .HasComment("对应ScopeOrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.PapersType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件类型  身份证、军人证、学生证、港澳通行证、护照、残疾人证、其它");
                entity.Property(e => e.PickupPrice)
                    .HasComment("接送价格")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Price)
                    .HasComment("价格")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.RealName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态 默认1正常 0：作废  1：正常");
                entity.Property(e => e.TotalPrice)
                    .HasComment("个人总价")
                    .HasColumnType("decimal(7, 2)");
            });

            modelBuilder.Entity<ScopeOrderListServiceList>(entity =>
            {
                entity.ToTable("ScopeOrderList_ServiceList", tb => tb.HasComment("业务订单购买服务明细"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.InfoId)
                    .HasComment("对应ScopeOrderList_Info.ID,整张订单生效则为0")
                    .HasColumnName("InfoID");
                entity.Property(e => e.OrderId)
                    .HasComment("对应ScopeOrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.Price)
                    .HasComment("价格")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.ScopeGoodsId)
                    .HasComment("业务ID")
                    .HasColumnName("ScopeGoodsID");
                entity.Property(e => e.ScopeGoodsName)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("业务名称");
                entity.Property(e => e.ServiceId)
                    .HasComment("对应ScopeExtraService.ID")
                    .HasColumnName("ServiceID");
                entity.Property(e => e.ServiceName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("服务名 对应ScopeExtraService.ServiceName");
                entity.Property(e => e.SetDate)
                    .HasComment("使用日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常  0作废");
                entity.Property(e => e.Used)
                    .HasDefaultValue(true)
                    .HasComment("是否已生效 默认1是，否0.生效则不作退款。");
                entity.Property(e => e.UsedTime)
                    .HasComment("后台确认时间")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<ScopeType>(entity =>
            {
                entity.ToTable("ScopeType", tb => tb.HasComment("业务大类"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.IconUrl)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("图标路径");
                entity.Property(e => e.IsPublic).HasComment("是否公开业务  默认0：否    1：是");
                entity.Property(e => e.ScopeTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("业务大类  包车、酒店、旅游");
                entity.Property(e => e.SortIndex).HasComment("排序");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用  1：正常（默认）");
            });

            modelBuilder.Entity<ScopeTypeClassify>(entity =>
            {
                entity.ToTable("ScopeType_Classify", tb => tb.HasComment("业务大类分类"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BusinessId)
                    .HasComment("商户ID，对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.ClassifyName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("业务子分类名称");
                entity.Property(e => e.Description)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("描述");
                entity.Property(e => e.LogoUrl)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("分类图标");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用  1：正常（默认）");
                entity.Property(e => e.TypeId)
                    .HasComment("业务大类ID  ，对应ScopeType.ID")
                    .HasColumnName("TypeID");
            });

            modelBuilder.Entity<SearchFlightRecord>(entity =>
            {
                entity.ToTable("SearchFlightRecord", tb => tb.HasComment("查找航班记录"));

                entity.HasIndex(e => new { e.RecordType, e.UserId }, "Type");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ArrCity)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("到达城市");
                entity.Property(e => e.BuyChannel)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("购买渠道  小程序、其他");
                entity.Property(e => e.Checker)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("回访人");
                entity.Property(e => e.ChooseReason)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("选择原因 机票价、手续费、会员、航线，不知道。");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.DateLog)
                    .HasComment("搜索日期记录")
                    .HasColumnType("text");
                entity.Property(e => e.DepCity)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("出发城市");
                entity.Property(e => e.GoOutPurpose)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("出行目的");
                entity.Property(e => e.HasBuy).HasComment("是否已购买");
                entity.Property(e => e.HasBuyAppointService).HasComment("是否有购买接送服务");
                entity.Property(e => e.HasBuyBusTicket).HasComment("是否已订车票");
                entity.Property(e => e.HasKnowPolicy)
                    .HasDefaultValue(true)
                    .HasComment("是否已知道政策");
                entity.Property(e => e.HasOwnChannelPolicy).HasComment("是否有享受政策");
                entity.Property(e => e.IsChecked).HasComment("是否已回访");
                entity.Property(e => e.NotBuyReason)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("未购买原因");
                entity.Property(e => e.RecordType)
                    .HasDefaultValue(1)
                    .HasComment("记录类型 1：机票查询  2:机票预约");
                entity.Property(e => e.Remark)
                    .HasComment("回访备注")
                    .HasColumnType("text");
                entity.Property(e => e.Times)
                    .HasDefaultValue(1)
                    .HasComment("次数");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID")
                    .HasColumnName("UserID");
                entity.Property(e => e.VisitDate)
                    .HasComment("回访时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.VisitedState).HasComment("回访状态：0未回访 1已回访 2可成交 3不可成交 4已成交");
            });

            modelBuilder.Entity<ShareEvent>(entity =>
            {
                entity.ToTable("ShareEvent", tb => tb.HasComment("分享活动"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.EndDate)
                    .HasComment("结束日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.EventContent)
                    .HasComment("活动内容")
                    .HasColumnType("text");
                entity.Property(e => e.EventName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("活动名称");
                entity.Property(e => e.IconUrl)
                    .HasMaxLength(80)
                    .IsUnicode(false)
                    .HasComment("分享图标");
                entity.Property(e => e.ShareUrl)
                    .HasMaxLength(80)
                    .IsUnicode(false)
                    .HasComment("分享连接");
                entity.Property(e => e.StartDate)
                    .HasComment("开始日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停  1：正常（默认）");
                entity.Property(e => e.Title)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("分享标题");
            });

            modelBuilder.Entity<ShareEventRecord>(entity =>
            {
                entity.ToTable("ShareEvent_Record", tb => tb.HasComment("分享点赞记录"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.EventId)
                    .HasComment("活动ID，对应ShareEvent.ID")
                    .HasColumnName("EventID");
                entity.Property(e => e.SignUserId)
                    .HasComment("点赞人")
                    .HasColumnName("SignUserID");
                entity.Property(e => e.UserId)
                    .HasComment("对应UserData.ID")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<ShareEventRecordActivityRecord>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToTable("ShareEvent_Record_ActivityRecord");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");
                entity.Property(e => e.FormOpenid)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Id)
                    .ValueGeneratedOnAdd()
                    .HasColumnName("ID");
                entity.Property(e => e.Telephone)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValue("未知");
                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<ShareEventRecordClickList>(entity =>
            {
                entity.ToTable("ShareEvent_Record_ClickList");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate).HasColumnType("datetime");
                entity.Property(e => e.DotWxoOpenId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("DotWxoOpenID");
                entity.Property(e => e.FromUserId).HasDefaultValue(0);
                entity.Property(e => e.FromWxOpenId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("FromWxOpenID");
                entity.Property(e => e.RecordId).HasColumnName("RecordID");
                entity.Property(e => e.Telephone)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValue("未知");
            });

            modelBuilder.Entity<StorageCompany>(entity =>
            {
                entity.ToTable("StorageCompany");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Amount)
                    .HasComment("预存款额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.CompanyId)
                    .HasComment("分销商ID")
                    .HasColumnName("CompanyID");
                entity.Property(e => e.UpdateDate)
                    .HasComment("操作时间")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<StorageCompanyDetail>(entity =>
            {
                entity.ToTable("StorageCompany_Detail");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Amount)
                    .HasComment("金额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.CompanyId).HasColumnName("CompanyID");
                entity.Property(e => e.CreateDate)
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.OperationId).HasComment("操作人id(DistributionUserInfo.id)");
                entity.Property(e => e.OperationType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("操作类型：消费、充值");
                entity.Property(e => e.OrderInfoId).HasColumnName("OrderInfoID");
                entity.Property(e => e.RemainAmount).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Remarks)
                    .HasMaxLength(500)
                    .IsUnicode(false);
                entity.Property(e => e.StorageCompanyId).HasColumnName("StorageCompanyID");
            });

            modelBuilder.Entity<SubsidyRule>(entity =>
            {
                entity.ToTable("SubsidyRule", tb => tb.HasComment("车票补贴规则"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建记录时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.GetOff)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("指定目的地");
                entity.Property(e => e.GetOn)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("指定上车点");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1启用 1：启用补贴  0：停用");
                entity.Property(e => e.SubsidyPrice)
                    .HasComment("补贴额度")
                    .HasColumnType("decimal(5, 2)");
                entity.Property(e => e.TypeId)
                    .HasComment("类型ID  对应BusLineType.ID")
                    .HasColumnName("TypeID");
                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<SysAccount>(entity =>
            {
                entity.ToTable("SysAccount", tb => tb.HasComment("系统操作帐号"));

                entity.HasIndex(e => e.UserName, "IX_SysAccount").IsUnique();

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.BaseWage)
                    .HasComment("基本工资")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.BusinessId)
                    .HasComment("对应Business.ID")
                    .HasColumnName("BusinessID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.DepId)
                    .HasMaxLength(10)
                    .IsFixedLength()
                    .HasColumnName("Dep_ID");
                entity.Property(e => e.DepartName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("部门名称");
                entity.Property(e => e.JobGrade)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("职级");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("手机号码");
                entity.Property(e => e.Password)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("密码");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.RoleId)
                    .HasDefaultValue(0)
                    .HasColumnName("role_id");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1：正常   0：停用");
                entity.Property(e => e.Token)
                    .HasMaxLength(32)
                    .IsUnicode(false);
                entity.Property(e => e.UserName)
                    .HasMaxLength(12)
                    .IsUnicode(false)
                    .HasComment("用户名");
                entity.Property(e => e.WxOpenId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("绑定公众号ID")
                    .HasColumnName("WxOpenID");
            });

            modelBuilder.Entity<SysAccountRole>(entity =>
            {
                entity.ToTable("SysAccount_Role", tb => tb.HasComment("系统用户－权限表"));

                entity.HasIndex(e => e.UserId, "IX_SysAccount_Role").IsUnique();

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CheckApplyRefund).HasComment("审批退款权限");
                entity.Property(e => e.CheckOrder).HasComment("是否可验票");
                entity.Property(e => e.OperateFrequency).HasComment("是否可操作线路  创建修改之类");
                entity.Property(e => e.OperateGroups).HasComment("操作分组权限");
                entity.Property(e => e.OperateModel).HasComment("是否可操作模板");
                entity.Property(e => e.OperateOrder).HasComment("是否可操作修改订单");
                entity.Property(e => e.OperatePickupOrder).HasComment("操作接送订单权限");
                entity.Property(e => e.OperateRole).HasComment("是否可更改操作权限");
                entity.Property(e => e.OverCheckOrder).HasComment("超时验票");
                entity.Property(e => e.StatOperate).HasComment("统计查询");
                entity.Property(e => e.UserId)
                    .HasComment("对应SysAccount.ID")
                    .HasColumnName("UserID");
                entity.Property(e => e.ViewApplyOperate).HasComment("查看申请操作列表");
                entity.Property(e => e.ViewFrequency).HasComment("是否可查看线路");
                entity.Property(e => e.ViewOrder).HasComment("是否可查看订单");
                entity.Property(e => e.ViewPickupOrder).HasComment("是否可查看接送订单");
            });

            modelBuilder.Entity<SysAccountToken>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK__SysAccou__3214EC275EFFD616");

                entity.ToTable("SysAccount_Token");

                entity.HasIndex(e => new { e.Token, e.UserId }, "PrimaryKey");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Token)
                    .HasMaxLength(600)
                    .HasComment("用户令牌")
                    .UseCollation("SQL_Latin1_General_CP1_CI_AS");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID")
                    .HasColumnName("User_ID");
            });

            modelBuilder.Entity<SysMenu>(entity =>
            {
                entity.ToTable("SysMenu", tb => tb.HasComment("系统列表菜单"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Ctler)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("控制器页");
                entity.Property(e => e.Expanded)
                    .HasDefaultValue(true)
                    .HasComment("是否展开");
                entity.Property(e => e.FatherId)
                    .HasComment("父节点ID")
                    .HasColumnName("FatherID");
                entity.Property(e => e.State)
                    .HasDefaultValue(true)
                    .HasComment("状态");
                entity.Property(e => e.Title)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("标题");
            });

            modelBuilder.Entity<SysMenuList>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK__Permissi__3214EC2733D4B598");

                entity.ToTable("SysMenuList", tb => tb.HasComment("权限表"));

                entity.Property(e => e.Id)
                    .HasDefaultValueSql("('1')")
                    .HasColumnName("ID");
                entity.Property(e => e.MenuCode)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("权限的代码/通配符,对应代码中@RequiresPermissions 的value");
                entity.Property(e => e.MenuName)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("菜单的中文释义");
                entity.Property(e => e.ParentMenu).HasComment("父级菜单ID 一级菜单默认为0");
                entity.Property(e => e.Remarks)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("本权限的中文释义");
                entity.Property(e => e.RequiredPerMission)
                    .HasMaxLength(255)
                    .IsUnicode(false)
                    .HasComment("是否本菜单必选权限, 1.必选 2非必选 通常是\"列表\"权限是必选");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态：1 正常  0作废");
            });

            modelBuilder.Entity<TicketOrderView>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToView("TicketOrderView");

                entity.Property(e => e.AgeType)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.AppointAddress)
                    .HasMaxLength(250)
                    .IsUnicode(false);
                entity.Property(e => e.AppointTime).HasColumnType("datetime");
                entity.Property(e => e.BusinessId).HasColumnName("BusinessID");
                entity.Property(e => e.CardNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("CardNO");
                entity.Property(e => e.CheckTime).HasColumnType("datetime");
                entity.Property(e => e.Checker)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.CheckerId).HasColumnName("CheckerID");
                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.CreateDate).HasColumnType("datetime");
                entity.Property(e => e.EditableTime).HasColumnType("datetime");
                entity.Property(e => e.Expr2)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Expr3).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Expr4).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Expr6).HasColumnType("decimal(5, 2)");
                entity.Property(e => e.FlightNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.FlightOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.FreNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.FrequencyId).HasColumnName("FrequencyID");
                entity.Property(e => e.FromPlace)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.FromSalesId).HasColumnName("FromSalesID");
                entity.Property(e => e.FromTermin)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.GetOff)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.GetOn)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.LineName)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.OverLuggagePrice).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.PapersType)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.PickupCity)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.PickupDistrict)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.PickupPrice).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Price).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.PrintInfo).HasColumnType("text");
                entity.Property(e => e.PrintTime).HasColumnType("datetime");
                entity.Property(e => e.RealName)
                    .HasMaxLength(30)
                    .IsUnicode(false);
                entity.Property(e => e.ReceiptNum)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.SetDate).HasColumnType("datetime");
                entity.Property(e => e.SetTime).HasColumnType("datetime");
                entity.Property(e => e.StationServicePrice).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.TargetAddress)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.TicketType)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.ToPlace)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.TotalPrice).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.UserId).HasColumnName("UserID");
            });

            modelBuilder.Entity<TmpContact>(entity =>
            {
                entity.ToTable("tmpContact", tb => tb.HasComment("临时联系人表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CardNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("身份证")
                    .HasColumnName("CardNO");
                entity.Property(e => e.HeadPic)
                    .HasComment("身份证头像图")
                    .HasColumnType("text");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("电话");
                entity.Property(e => e.PapersType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件类型   身份证、学生证、残疾军人证，护照");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.Sex)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("性别");
            });

            modelBuilder.Entity<UserBonu>(entity =>
            {
                entity.ToTable(tb => tb.HasComment("用户消费、积分总表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.LastUpdate)
                    .HasComment("上次更新时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.TotalBonus).HasComment("总积分");
                entity.Property(e => e.TotalCost).HasComment("总消费额");
                entity.Property(e => e.UserId)
                    .HasComment("对应USER ID")
                    .HasColumnName("UserID");
                entity.Property(e => e.WxOpenId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("WXOPENID   ")
                    .HasColumnName("WxOpenID");
            });

            modelBuilder.Entity<UserBonusRecord>(entity =>
            {
                entity.ToTable("UserBonus_Record", tb => tb.HasComment("用户积分记录"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Bonus).HasComment("积分");
                entity.Property(e => e.Cost).HasComment("消费金额");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.OrderId)
                    .HasComment("对应OrderList.ID")
                    .HasColumnName("OrderID");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1正常  0：作废  1：正常");
                entity.Property(e => e.UserId)
                    .HasComment("对应UserData.ID")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<UserDataAddress>(entity =>
            {
                entity.ToTable("UserData_Address", tb => tb.HasComment("客户地址表"));

                entity.HasIndex(e => e.BusinessUid, "BusinessUSER");

                entity.HasIndex(e => new { e.UserId, e.Status, e.BusinessId }, "UserID");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Address)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasComment("详细地址");
                entity.Property(e => e.BusinessId)
                    .HasDefaultValue(1)
                    .HasComment("Company.ID")
                    .HasColumnName("Business_ID");
                entity.Property(e => e.BusinessUid)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("商户用户ID")
                    .HasColumnName("Business_UID");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("城市");
                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人姓名");
                entity.Property(e => e.District)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("城镇区");
                entity.Property(e => e.IsDefault).HasComment("是否默认");
                entity.Property(e => e.Location)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("座标");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人电话");
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("省份");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用  1：正常");
                entity.Property(e => e.UserId)
                    .HasComment("客户ID 对应User.ID")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<UserDataApproval>(entity =>
            {
                entity.ToTable("UserData_Approval");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ApprovalDate)
                    .HasComment("审核时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.CardNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件号码")
                    .HasColumnName("CardNO");
                entity.Property(e => e.CheckState).HasComment("审核状态   0：待审核   1：已审核   2：驳回审核");
                entity.Property(e => e.Checker)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("审核人");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.EffectiveTime)
                    .HasComment("有效时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.IdcardUrl)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("证件连接")
                    .HasColumnName("IDCardUrl");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("电话号码");
                entity.Property(e => e.PapersType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件类型");
                entity.Property(e => e.Remark)
                    .HasComment("备注")
                    .HasColumnType("text");
                entity.Property(e => e.Sex)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("性别");
                entity.Property(e => e.SpCardUrl)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("工作证件连接");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("记录状态  0：作废  1：正常");
                entity.Property(e => e.UserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("姓名");
            });

            modelBuilder.Entity<UserDataContact>(entity =>
            {
                entity.ToTable("UserData_Contact", tb => tb.HasComment("用户联系人表"));

                entity.HasIndex(e => e.UserId, "UserID");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AgeType)
                    .HasDefaultValue(1)
                    .HasComment("1：成人  2：儿童   3：婴儿");
                entity.Property(e => e.Birthday)
                    .HasComment("生日")
                    .HasColumnType("datetime");
                entity.Property(e => e.CardNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("身份证")
                    .HasColumnName("CardNO");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.HeadPic)
                    .HasComment("身份证头像图")
                    .HasColumnType("text");
                entity.Property(e => e.IdcardUrl)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("身份证图片连接")
                    .HasColumnName("IDCardUrl");
                entity.Property(e => e.IsChecked).HasComment("是否已审核  默认0未审   1已审");
                entity.Property(e => e.IsSpGuest).HasComment("是否特殊优惠用户");
                entity.Property(e => e.LastUseTicketType)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("上次使用票类");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("电话");
                entity.Property(e => e.PapersType)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("证件类型   身份证、学生证、残疾军人证，护照");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.Sex)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("性别");
                entity.Property(e => e.SpCardUrl)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("特殊证件图片连接");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  默认1：正常   0：停用");
                entity.Property(e => e.UserId)
                    .HasComment("UserData.ID")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<UserDataVipContract>(entity =>
            {
                entity.ToTable("UserData_VipContract", tb => tb.HasComment("用户VIP协议"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.DesServicePrice)
                    .HasComment("成为会员后服务费收费")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.Description)
                    .HasComment("优惠项目说明")
                    .HasColumnType("text");
                entity.Property(e => e.DiscountRatio).HasComment("折扣比例 （0.1-1）");
                entity.Property(e => e.PriceRules)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("价格规则  直减（DiscountPrice）  百分比（DiscountRatio）");
                entity.Property(e => e.ProName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("产品名称 Ticket,Appoint,Scope,Flight");
                entity.Property(e => e.ProTitle)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  0：停用   1：正常（默认）");
                entity.Property(e => e.VipInfoId)
                    .HasComment("对应User_VipInfo.ID")
                    .HasColumnName("VipInfoID");
                entity.Property(e => e.VipLevel)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("VIP等级");
            });

            modelBuilder.Entity<UserDatePhoneInfo>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToTable("UserDate_PhoneInfo");

                entity.Property(e => e.Brand)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Createdate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.Id)
                    .ValueGeneratedOnAdd()
                    .HasColumnName("ID");
                entity.Property(e => e.IdCard)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Language)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Mobiletype)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Platform)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("platform");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Sdkverion)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("SDKVerion");
                entity.Property(e => e.System)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("system");
                entity.Property(e => e.Versiom)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("versiom");
                entity.Property(e => e.WxOpenId)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("WxOpenID");
                entity.Property(e => e.WxUnionid)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("WxUNIONID");
            });

            modelBuilder.Entity<UserDatum>(entity =>
            {
                entity.ToTable(tb => tb.HasComment("用户信息"));

                entity.HasIndex(e => new { e.AccountType, e.WxOpenId, e.WxUnionid }, "Account");

                entity.HasIndex(e => new { e.RealName, e.Idcard }, "IX_UserData");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AccountType).HasComment("帐号类型 0：小程序  1：候机楼公众号  2：运通公众号  3：工行E生活号");
                entity.Property(e => e.Address)
                    .HasComment("住址")
                    .HasColumnType("text");
                entity.Property(e => e.City)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("城市");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.HeadPic)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("头像连接");
                entity.Property(e => e.Idcard)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("身份证")
                    .HasColumnName("IDCard");
                entity.Property(e => e.IsVip).HasComment("是否VIP");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("手机号码");
                entity.Property(e => e.NickName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("昵称");
                entity.Property(e => e.Province)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("省份");
                entity.Property(e => e.RandomCode)
                    .HasMaxLength(6)
                    .IsUnicode(false);
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.Sex)
                    .HasMaxLength(10)
                    .IsUnicode(false)
                    .HasComment("性别");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("用户状态   默认1  0：停用  1：正常");
                entity.Property(e => e.VipEndDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("VIP结束日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.VipLevel)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasDefaultValue("普通用户")
                    .HasComment("VIP等级");
                entity.Property(e => e.WxOpenId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("小程序OPENID")
                    .HasColumnName("WxOpenID");
                entity.Property(e => e.WxUnionid)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("微信用户唯一ID")
                    .HasColumnName("WxUNIONID");
            });

            modelBuilder.Entity<UserInclude>(entity =>
            {
                entity.ToTable("UserInclude", tb => tb.HasComment("帐户包含"));

                entity.HasIndex(e => e.UserId, "PriKey");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.UserId)
                    .HasComment("对应UserData.ID")
                    .HasColumnName("UserID");
                entity.Property(e => e.WxOpenId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("微信OPENID")
                    .HasColumnName("WxOpenID");
                entity.Property(e => e.WxUnionid)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("微信UNIONID")
                    .HasColumnName("WxUNIONID");
            });

            modelBuilder.Entity<UserOrder>(entity =>
            {
                entity.ToTable("UserOrder", tb => tb.HasComment("用户订单表"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.DiscountAmount)
                    .HasComment("优惠金额")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.DiscountType).HasComment("优惠类型  0：积分  1：代金券 ");
                entity.Property(e => e.OrderMsg)
                    .HasComment("订单信息备注")
                    .HasColumnType("text");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("订单号");
                entity.Property(e => e.OrderState).HasComment("订单状态  0：已下单，未支付   1：已支付");
                entity.Property(e => e.OrderType).HasComment("订单类型  0：帐户充值  后续按需扩充");
                entity.Property(e => e.PayDate)
                    .HasComment("支付时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.PayPrice)
                    .HasComment("实际支付金额")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.ProductName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("产品名称  如：成为VIP会员，帐号充值，代金券。");
                entity.Property(e => e.Remarks)
                    .HasComment("订单客户备注")
                    .HasColumnType("text");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("订单状态  0：作废  1：正常");
                entity.Property(e => e.TotalPrice)
                    .HasComment("总价，但不一定是最终支付价。")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.UseDiscount).HasComment("是否使用优惠");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<UserVipInfo>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK_User_VipInfo_1");

                entity.ToTable("User_VipInfo");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Bonus).HasComment("用户积分数");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("购买日期")
                    .HasColumnType("datetime");
                entity.Property(e => e.EndDate)
                    .HasComment("到期时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Idcard)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("身份证")
                    .HasColumnName("IDCard");
                entity.Property(e => e.LastUpdate)
                    .HasComment("上次续费时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系方式");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.SalesUserId)
                    .HasComment("销售人id  （线上小程序为0）")
                    .HasColumnName("SalesUserID");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态  正常  作废");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID")
                    .HasColumnName("UserID");
                entity.Property(e => e.VipId)
                    .HasComment("vip等级ID")
                    .HasColumnName("VipID");
                entity.Property(e => e.VipLevel)
                    .HasMaxLength(50)
                    .HasComment("VIP等级");
                entity.Property(e => e.VipStatus)
                    .HasDefaultValue(1)
                    .HasComment("Vip状态 1正常 2过期  ");
                entity.Property(e => e.WxUnionId)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("微信UNIONID")
                    .HasColumnName("WxUnionID");
            });

            modelBuilder.Entity<UserWallet>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK_User_MoneyPackage");

                entity.ToTable("UserWallet", tb => tb.HasComment("用户钱包"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AliUnionId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("阿里UNIONID")
                    .HasColumnName("AliUnionID");
                entity.Property(e => e.BonusAmt)
                    .HasComment("积分余额")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.CashAmt)
                    .HasComment("现金余额")
                    .HasColumnType("decimal(7, 2)");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.Idcard)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("身份证")
                    .HasColumnName("IDCard");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("电话");
                entity.Property(e => e.PayPassword)
                    .HasMaxLength(6)
                    .IsUnicode(false)
                    .HasComment("支付密码");
                entity.Property(e => e.PresentAmt)
                    .HasComment("赠送、活动余额")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.RandomCode)
                    .HasMaxLength(32)
                    .IsUnicode(false)
                    .HasComment("32位个人扰乱码");
                entity.Property(e => e.RealName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("真实姓名");
                entity.Property(e => e.Remarks).HasColumnType("text");
                entity.Property(e => e.UserId)
                    .HasComment("用户ID。对应表UserData.ID")
                    .HasColumnName("UserID");
                entity.Property(e => e.WxUnionId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("微信UNIONID")
                    .HasColumnName("WxUnionID");
            });

            modelBuilder.Entity<UserWalletRecord>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK_User_MoneyPackage_Record");

                entity.ToTable("UserWallet_Record", tb => tb.HasComment("用户钱包消费，充值记录。"));

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Bonus).HasColumnType("decimal(6, 2)");
                entity.Property(e => e.Cash).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.ChargeOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.PackageId)
                    .HasComment("钱包ID，对应User_MoneyPackage.ID")
                    .HasColumnName("PackageID");
                entity.Property(e => e.PayId)
                    .HasComment("支付表ID，对应PayRequests.ID")
                    .HasColumnName("PayID");
                entity.Property(e => e.Present).HasColumnType("decimal(6, 2)");
                entity.Property(e => e.Remarks).HasColumnType("text");
                entity.Property(e => e.Status)
                    .HasDefaultValue(1)
                    .HasComment("状态   0：作废   1：正常   2：成功   3：回退");
                entity.Property(e => e.Type).HasComment("类型  0：充值  1：消费   2：活动赠送");
                entity.Property(e => e.UserId)
                    .HasComment("使用、充值、入帐时操作帐号，对应UserData.ID")
                    .HasColumnName("UserID");
            });

            modelBuilder.Entity<UserWxInteraction>(entity =>
            {
                entity.ToTable("User_WxInteraction");

                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("id");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("点击时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.FromUserId).HasComment("分享用户id");
                entity.Property(e => e.Wxopenid)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("点赞人的openid")
                    .HasColumnName("WXOpenid");
            });

            modelBuilder.Entity<VBusinessAppointOrder>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToView("V_Business_AppointOrder");

                entity.Property(e => e.BookingEndAddress)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasColumnName("Booking_End_Address");
                entity.Property(e => e.BookingEndCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Booking_End_City");
                entity.Property(e => e.BookingEndDistrict)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Booking_End_District");
                entity.Property(e => e.BookingEndLat)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Booking_End_Lat");
                entity.Property(e => e.BookingEndLng)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Booking_End_Lng");
                entity.Property(e => e.BookingStartAddress)
                    .HasMaxLength(250)
                    .IsUnicode(false)
                    .HasColumnName("Booking_Start_Address");
                entity.Property(e => e.BookingStartCity)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Booking_Start_City");
                entity.Property(e => e.BookingStartDistrict)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Booking_Start_District");
                entity.Property(e => e.BookingStartLat)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Booking_Start_Lat");
                entity.Property(e => e.BookingStartLng)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Booking_Start_Lng");
                entity.Property(e => e.BookingTime)
                    .HasColumnType("datetime")
                    .HasColumnName("Booking_Time");
                entity.Property(e => e.BusinessOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Business_OrderNum");
                entity.Property(e => e.BusinessUid)
                    .HasMaxLength(64)
                    .IsUnicode(false)
                    .HasColumnName("Business_UID");
                entity.Property(e => e.CarNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Car_NO");
                entity.Property(e => e.Contact)
                    .HasMaxLength(90)
                    .IsUnicode(false);
                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasColumnName("Create_Date");
                entity.Property(e => e.DistanceAmount)
                    .HasColumnType("decimal(9, 2)")
                    .HasColumnName("Distance_Amount");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("Driver_Name");
                entity.Property(e => e.FromBusinessId).HasColumnName("FromBusinessID");
                entity.Property(e => e.FromPartner)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("From_Partner");
                entity.Property(e => e.LuggageQty).HasColumnName("Luggage_Qty");
                entity.Property(e => e.Mobile)
                    .HasMaxLength(90)
                    .IsUnicode(false);
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(20)
                    .IsUnicode(false);
                entity.Property(e => e.OrderState).HasColumnName("Order_State");
                entity.Property(e => e.OrderType).HasColumnName("Order_Type");
                entity.Property(e => e.OverLuggageAmount)
                    .HasColumnType("decimal(10, 2)")
                    .HasColumnName("Over_Luggage_Amount");
                entity.Property(e => e.PassengerQty).HasColumnName("Passenger_Qty");
                entity.Property(e => e.SetOutType).HasColumnName("SetOut_Type");
                entity.Property(e => e.TotalAmount)
                    .HasColumnType("decimal(9, 2)")
                    .HasColumnName("Total_Amount");
                entity.Property(e => e.UserRemarks)
                    .HasColumnType("text")
                    .HasColumnName("User_Remarks");
            });

            modelBuilder.Entity<VFrequencyModelSettlementByDay>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToView("V_FrequencyModel_SettlementByDay");

                entity.Property(e => e.AduitDkmember).HasColumnName("AduitDKMember");
                entity.Property(e => e.AduitDkprice)
                    .HasColumnType("decimal(38, 2)")
                    .HasColumnName("AduitDKPrice");
                entity.Property(e => e.AdultPrice).HasColumnType("decimal(38, 2)");
                entity.Property(e => e.ChildPrice).HasColumnType("decimal(38, 2)");
                entity.Property(e => e.LineName)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.ModelId).HasColumnName("ModelID");
                entity.Property(e => e.SetDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<VFrequencyPassengerList>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToView("V_FrequencyPassengerList");

                entity.Property(e => e.AgeType)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.CarId).HasColumnName("CarID");
                entity.Property(e => e.CarLevel)
                    .HasMaxLength(20)
                    .IsUnicode(false);
                entity.Property(e => e.CarModel)
                    .HasMaxLength(20)
                    .IsUnicode(false);
                entity.Property(e => e.CarNo)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("CarNO");
                entity.Property(e => e.CardNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("CardNO");
                entity.Property(e => e.CharteredPrice).HasColumnType("decimal(9, 2)");
                entity.Property(e => e.CompanyId).HasColumnName("CompanyID");
                entity.Property(e => e.CreateDate).HasColumnType("datetime");
                entity.Property(e => e.DepartStationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("departStationCode");
                entity.Property(e => e.DestinationStationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("destinationStationCode");
                entity.Property(e => e.DisabledArmymanTicketPrice).HasColumnType("decimal(5, 2)");
                entity.Property(e => e.DriverId).HasColumnName("DriverID");
                entity.Property(e => e.DriverName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Expr1).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.Expr2)
                    .HasMaxLength(30)
                    .IsUnicode(false);
                entity.Property(e => e.FreNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.FrequencyModel)
                    .HasMaxLength(20)
                    .IsUnicode(false);
                entity.Property(e => e.FrequencyType)
                    .HasMaxLength(20)
                    .IsUnicode(false);
                entity.Property(e => e.FromAppointOrderNum)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.FullTicketMaxPrice).HasColumnType("decimal(5, 2)");
                entity.Property(e => e.FullTicketPrice).HasColumnType("decimal(5, 2)");
                entity.Property(e => e.GoodsType)
                    .HasMaxLength(20)
                    .IsUnicode(false);
                entity.Property(e => e.HalfTicketPrice).HasColumnType("decimal(5, 2)");
                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.LineName)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.LineType)
                    .HasMaxLength(20)
                    .IsUnicode(false);
                entity.Property(e => e.Mobile)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.ModelId).HasColumnName("ModelID");
                entity.Property(e => e.ModelPlaceId).HasColumnName("ModelPlaceID");
                entity.Property(e => e.NanYueHashId).HasColumnName("NanYueHashID");
                entity.Property(e => e.NanYueTicketId).HasColumnName("NanYueTicketID");
                entity.Property(e => e.OriginCity)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.OriginProvince)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.OriginStationCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("originStationCode");
                entity.Property(e => e.PapersType)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Price).HasColumnType("decimal(5, 2)");
                entity.Property(e => e.RealName)
                    .HasMaxLength(30)
                    .IsUnicode(false);
                entity.Property(e => e.ReceiptNum)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.Remarks).HasColumnType("text");
                entity.Property(e => e.SetDate).HasColumnType("datetime");
                entity.Property(e => e.SetTime).HasColumnType("datetime");
                entity.Property(e => e.SitType)
                    .HasMaxLength(20)
                    .IsUnicode(false);
                entity.Property(e => e.StationServicePrice).HasColumnType("decimal(5, 2)");
                entity.Property(e => e.StudentTicketPrice).HasColumnType("decimal(5, 2)");
                entity.Property(e => e.TicketType)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.TotalKilo).HasColumnType("decimal(5, 2)");
                entity.Property(e => e.TrafficType)
                    .HasMaxLength(20)
                    .IsUnicode(false);
                entity.Property(e => e.TypeId).HasColumnName("TypeID");
                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.VipPrice).HasColumnType("decimal(5, 2)");
            });

            modelBuilder.Entity<VFrequencySettlement>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToView("V_Frequency_Settlement");

                entity.Property(e => e.GetOff)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.GetOn)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.RealTime).HasColumnType("datetime");
                entity.Property(e => e.SetDate).HasColumnType("datetime");
                entity.Property(e => e.SetTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<VGoOutPersonInfo>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToView("V_GoOutPersonInfo");

                entity.Property(e => e.FromTermin)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.OrderId).HasColumnName("OrderID");
                entity.Property(e => e.价格).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.出发日期).HasColumnType("datetime");
                entity.Property(e => e.出发点)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.出行目的)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.备注).HasColumnType("text");
                entity.Property(e => e.姓名)
                    .HasMaxLength(30)
                    .IsUnicode(false);
                entity.Property(e => e.手机号)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.旅客目的地)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.目的地)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.票号)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.航班号)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.订单号)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.订单状态)
                    .HasMaxLength(12)
                    .IsUnicode(false);
                entity.Property(e => e.身份证)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.车票类型)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<VOrderSetTimeSettlement>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToView("V_OrderSetTime_Settlement");

                entity.Property(e => e.GetOff)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.GetOn)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.GetOnTime).HasColumnType("datetime");
                entity.Property(e => e.SetDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<VOrderlistFenxiao>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToView("V_Orderlist_fenxiao");

                entity.Property(e => e.ContactId).HasColumnName("ContactID");
                entity.Property(e => e.FromTermin)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.OrderId).HasColumnName("OrderID");
                entity.Property(e => e.价格).HasColumnType("decimal(7, 2)");
                entity.Property(e => e.出发日期).HasColumnType("datetime");
                entity.Property(e => e.出发点)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.出行目的)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.发车时间).HasColumnType("datetime");
                entity.Property(e => e.备注).HasColumnType("text");
                entity.Property(e => e.姓名)
                    .HasMaxLength(30)
                    .IsUnicode(false);
                entity.Property(e => e.手机号)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.旅客目的地)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.目的地)
                    .HasMaxLength(100)
                    .IsUnicode(false);
                entity.Property(e => e.票号)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.航班号)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.订单号)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.订单状态)
                    .HasMaxLength(12)
                    .IsUnicode(false);
                entity.Property(e => e.身份证)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.车票类型)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<VSellSettlementByFrequency>(entity =>
            {
                entity
                    .HasNoKey()
                    .ToView("V_SellSettlementByFrequency");

                entity.Property(e => e.LineId).HasColumnName("LineID");
                entity.Property(e => e.LineName)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.ModelId).HasColumnName("ModelID");
                entity.Property(e => e.SetTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<VipCouponOrder>(entity =>
            {
                entity.ToTable("VIP_CouponOrder");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ApplyRule)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("应用规则");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime");
                entity.Property(e => e.DiscountAmount)
                    .HasComment("优惠金额")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.OrderNum)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("订单ID");
                entity.Property(e => e.PayPrice)
                    .HasComment("实际支付金额")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.Status)
                    .HasDefaultValue(true)
                    .HasComment("状态（0作废 1正常）");
                entity.Property(e => e.Title)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("使用优惠名称");
                entity.Property(e => e.TotalPrice)
                    .HasComment("总价")
                    .HasColumnType("decimal(6, 2)");
                entity.Property(e => e.VipId).HasComment("对应User_VipInfo.ID");
            });

            modelBuilder.Entity<VipLevel>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK_Vip_Description");

                entity.ToTable("Vip_Level");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.Description)
                    .HasComment("描述")
                    .HasColumnType("text");
                entity.Property(e => e.Discount)
                    .HasDefaultValue(1.0)
                    .HasComment("折扣 （0.1-1）");
                entity.Property(e => e.EffectMonth).HasComment("生效月份");
                entity.Property(e => e.IsBeVip).HasComment("是否升级成为VIP");
                entity.Property(e => e.LevelNum).HasComment("会员等级数");
                entity.Property(e => e.Status).HasComment("状态  1正常 2作废");
                entity.Property(e => e.VipLevel1)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("等级名称")
                    .HasColumnName("VipLevel");
                entity.Property(e => e.VipPrice)
                    .HasComment("价格（每月）")
                    .HasColumnType("decimal(8, 2)");
            });

            modelBuilder.Entity<VipProPrice>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK_VIP_ProPrice");

                entity.ToTable("Vip_ProPrice");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.CreateDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间")
                    .HasColumnType("datetime");
                entity.Property(e => e.DesServicePrice)
                    .HasComment("成功会员后服务费收费")
                    .HasColumnType("decimal(8, 2)");
                entity.Property(e => e.Description).HasColumnType("text");
                entity.Property(e => e.DiscountRatio).HasComment("折扣比例 （0.1-1）  ");
                entity.Property(e => e.Icon)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.PriceRules)
                    .HasMaxLength(50)
                    .HasComment("价格规则  直减（DiscountPrice）  百分比（DiscountRatio）");
                entity.Property(e => e.ProName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("产品名称 FirstOrder,Ticket,Appoint,Scope,Flight");
                entity.Property(e => e.ProTitle)
                    .HasMaxLength(150)
                    .IsUnicode(false);
                entity.Property(e => e.Status).HasComment("状态  1正常 2作废");
                entity.Property(e => e.VipLevelId).HasComment("VIP等级ID  对应Vip登记表");
            });

            modelBuilder.Entity<WeChatParam>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("PK__WeChat_P__3214EC27538E236A");

                entity.ToTable("WeChat_Params", tb => tb.HasComment("微信平台参数"));

                entity.HasIndex(e => e.Platform, "GetDataKey");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.AccessToken)
                    .HasMaxLength(255)
                    .HasComment("ACCESS_TOKEN")
                    .HasColumnName("Access_Token");
                entity.Property(e => e.AppId)
                    .HasMaxLength(50)
                    .HasComment("APPID");
                entity.Property(e => e.CompanyId)
                    .HasComment("公司ID")
                    .HasColumnName("CompanyID");
                entity.Property(e => e.GetTicketTime)
                    .HasComment("获取票据时间")
                    .HasColumnName("GetTicket_Time");
                entity.Property(e => e.GetTokenTime)
                    .HasComment("获取令牌时间")
                    .HasColumnName("GetToken_Time");
                entity.Property(e => e.JsApiTicket)
                    .HasMaxLength(255)
                    .HasComment("JS_API_TICKET")
                    .HasColumnName("Js_Api_Ticket");
                entity.Property(e => e.MchId)
                    .HasMaxLength(50)
                    .HasComment("微信支付商户号ID");
                entity.Property(e => e.PayKey)
                    .HasMaxLength(255)
                    .HasComment("支付KEY");
                entity.Property(e => e.Platform)
                    .HasMaxLength(50)
                    .HasComment("平台名称 小程序、公众号");
                entity.Property(e => e.PlatformType)
                    .HasDefaultValue(1)
                    .HasComment("平台类型 0：微信小程序  1：微信公众号");
                entity.Property(e => e.Secret)
                    .HasMaxLength(255)
                    .HasComment("SECRET");
                entity.Property(e => e.SslCertPath)
                    .HasMaxLength(255)
                    .HasComment("SSL证书路径")
                    .HasColumnName("SSL_Cert_Path");
                entity.Property(e => e.TicketExpireTime).HasComment("票据超时时间（秒）");
                entity.Property(e => e.TokenExpireTime).HasComment("令牌超时时间（秒）");
            });

            modelBuilder.Entity<Zhresponse>(entity =>
            {
                entity.ToTable("ZHResponse");

                entity.Property(e => e.Id).HasColumnName("ID");
                entity.Property(e => e.ExpiresIn)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("expires_in");
                entity.Property(e => e.GetDate)
                    .HasDefaultValueSql("(getdate())")
                    .HasColumnType("datetime")
                    .HasColumnName("Get_Date");
                entity.Property(e => e.GetexpiresInTime)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("Getexpires_inTime");
                entity.Property(e => e.RefreshToken)
                    .HasMaxLength(8000)
                    .IsUnicode(false)
                    .HasColumnName("refresh_token");
                entity.Property(e => e.TokenType)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("token_type");
                entity.Property(e => e.Zhtoken)
                    .HasMaxLength(8000)
                    .IsUnicode(false)
                    .HasComment("珠海token")
                    .HasColumnName("ZHtoken");
            });

            OnModelCreatingPartial(modelBuilder);
        }

        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
    }
}